Skip to content

Instantly share code, notes, and snippets.

@KasperTidemann
Created January 7, 2013 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KasperTidemann/4476164 to your computer and use it in GitHub Desktop.
Save KasperTidemann/4476164 to your computer and use it in GitHub Desktop.
A simple, shortened example of needs in a controller in Ember.js
App.TestController = Em.Controller.extend({
needs: 'user',
userController: (function() {
return this.controllerFor('user');
}).property(),
someObserver: (function() {
@get('userController.someValue')
}).observes('userController.someValue')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment