This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.registerViewHelper = (name, view) -> | |
Em.Handlebars.registerHelper name, (property, options) -> | |
options.hash.textBinding = property.toString() | |
Em.Handlebars.helpers.view.call this, view, options | |
App.registerViewHelper 'say', Em.View.extend | |
tagName: 'span' | |
template: Em.Handlebars.compile('{{view.say}}') | |
# Properties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.ExampleController = Em.Controller.extend({ | |
needs: ['user'], | |
userController: (function() { | |
return this.controllerFor('user'); | |
}).property(), | |
username: (function() { | |
return this.get('userController.username') + ' Funkypants!'; | |
}).property('userController.username') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.TestController = Em.Controller.extend({ | |
needs: 'user', | |
userController: (function() { | |
return this.controllerFor('user'); | |
}).property(), | |
someObserver: (function() { | |
@get('userController.someValue') | |
}).observes('userController.someValue') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
window.DS = Ember.Namespace.create({ | |
CURRENT_API_REVISION: 10 | |
}); | |
})(); | |
(function() { |