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
// accessing controller in route's model hook | |
App.PostsRoute = Em.Route.extend({ | |
model: function() { | |
// getPosts will return a promise | |
return this.get('controller').getPosts(); | |
} |
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
computedArray: function() { | |
var self = this; | |
ajax('/someurl').then(function(jsonArray) { | |
self.set('computedArray', jsonArray); | |
}); | |
}.property() |
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.TBodyView = Ember.CollectionView.extend({ | |
itemViewClass: 'App.TRView', | |
createChildView: function(view, attrs) { | |
var columns = this.get('columns'); | |
return this._super(view, { content: columns, | |
row: attrs.content, | |
contentIndex: attrs.contentIndex | |
}); | |
} | |