Skip to content

Instantly share code, notes, and snippets.

@BenGitsCode
Created March 7, 2017 15:57
Show Gist options
  • Save BenGitsCode/68be65e1c605a4339b0047d76e70202c to your computer and use it in GitHub Desktop.
Save BenGitsCode/68be65e1c605a4339b0047d76e70202c to your computer and use it in GitHub Desktop.
Embering
import Ember from 'ember';
export default Ember.Route.extend({
model(/*params*/) { // or model: function() { }
return retrieveModel(); // return your model
}
// model() referred to as `model hook` because it's a specific method invoked
// by the Ember framework every time it needs to handle a web request.
// Can be thought of as a deserialzation process from String to Object
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment