1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/routes/custom-index.js.es6

16 Zeilen
394 B
Text

2017-10-13 15:02:34 +02:00
export default Ember.Route.extend({
beforeModel() {
2017-10-13 15:02:34 +02:00
const appModel = this.modelFor('custom');
if (appModel.completed) {
this.set('completed', true);
} else if (appModel.start) {
this.replaceWith('custom.step', appModel.start);
}
},
setupController(controller) {
const completed = this.get('completed');
controller.set('completed', completed);
}
});