Skip to content

Instantly share code, notes, and snippets.

@vadimi
Created September 15, 2013 00:18
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 vadimi/6566922 to your computer and use it in GitHub Desktop.
Save vadimi/6566922 to your computer and use it in GitHub Desktop.
App.NewsRoute = Em.Route.extend({
model: function (params) {
return params;
},
setupController: function (controller) {
controller.load();
}
});
App.NewsController = Em.ArrayController.extend({
load: function () {
var controller = this;
App.News.findAll().then(function (news) {
controller.set('content', news);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment