Skip to content

Instantly share code, notes, and snippets.

@jackkitley
Last active December 11, 2015 21:28
Show Gist options
  • Save jackkitley/4662568 to your computer and use it in GitHub Desktop.
Save jackkitley/4662568 to your computer and use it in GitHub Desktop.
//TEMPLATE
{{#linkTo account account}}View{{/linkTo}}
//ROUTER
App.Router.map(function() {
this.resource('accounts', function() {
//this.route('account', { path: ':accountguid' });
});
this.resource('account', { path: '/accounts/:accountguid' });
});
App.AccountsRoute = Ember.Route.extend({
setupController: function(controller, model) {
controller.set('searchfilter','ALL');
controller.search();
}
});
App.AccountRoute = Ember.Route.extend({
setupController: function(controller, model) {
},
model: function(params) {
this.controllerFor('account').show(params);
},
serialize: function(model){
return {accountguid: Em.get(model, 'accountguid')}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment