Created
June 15, 2015 19:32
-
-
Save egrueter-dev/070a375c5a468f241ec3 to your computer and use it in GitHub Desktop.
Ember_router
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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
model: function (params) { | |
return Ember.RSVP.hash({ | |
school: this.store.find('school', params.school_id), | |
// data: Ember.$.getJSON('api/surveygizmodata', { school_id: params.school_id } | |
// need to : use a call like this one to retrieve your data from the server. | |
}).then(function (hash) { | |
// set your data as an attribute of the model here: | |
// hash.school.set('surveyDashboardData', hash.data); | |
return hash.school; | |
}); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment