Created
July 6, 2015 15:30
-
-
Save koriroys/d9e68b033183f2a624b2 to your computer and use it in GitHub Desktop.
Code for previewing ember loading templates
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
// 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