Skip to content

Instantly share code, notes, and snippets.

@koriroys
Created July 6, 2015 15:30
Show Gist options
  • Save koriroys/d9e68b033183f2a624b2 to your computer and use it in GitHub Desktop.
Save koriroys/d9e68b033183f2a624b2 to your computer and use it in GitHub Desktop.
Code for previewing ember loading templates
// routes/books.js
export default Ember.Route.extend({
model: function() {
var route = this;
return new Ember.RSVP.Promise(function(resolve) {
Ember.run.later(function() {
var model = route.store.find('book');
resolve(model);
}, 3000); // 3 second delay
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment