return this.get('firstName') + ' ' + this.get('lastName'); // Tell Ember that this computed property depends on // firstName and lastName }.property('firstName', 'lastName') });
function(manager) { manager.transitionTo('posts.index') } }), posts: Ember.State.extend({ route: "/posts", setupContext: function(manager) { // the postsController is shared between the index and // show views, so set it up here var postsController = manager.get('postsController'); postsController.set('content', Post.findAll()); }, // [...]
the application's main view is a ContainerView whose // view is bound to the manager's `currentView` manager.set('currentView', App.PostsView.create({ controller: postsController })); }, showPost: function(manager, event) { // this event was triggered from an {{action}} inside of // an {{#each}} loop in a template manager.transitionTo('show', event.context); } }), // [...]