discourse/app/assets/javascripts/wizard/routes/step.js.es6
2016-09-22 09:52:19 -04:00

13 lines
351 B
JavaScript

export default Ember.Route.extend({
model(params) {
const allSteps = this.modelFor('application').steps;
const step = allSteps.findProperty('id', params.step_id);
return step ? step : allSteps[0];
},
setupController(controller, step) {
controller.setProperties({
step, wizard: this.modelFor('application')
});
}
});