Created
May 31, 2012 15:16
-
-
Save ppcano/2844086 to your computer and use it in GitHub Desktop.
Is there any view in Ember to avoid something like the view below?
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
| Yn.BoundView = Em.View.extend({ | |
| item: null, | |
| render: function(buffer) { | |
| buffer.push( this.get('item') ); | |
| }, | |
| _itemDidChange: Ember.observer(function() { | |
| this.rerender(); | |
| }, 'item') | |
| }); |
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
| var App.ItemView = Em.View.extend({ | |
| item:null, | |
| template: Em.Handlerbars.compile('{{item}}') | |
| }); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any better approach than BoundView????