1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/routes/custom-index.js.es6
Angus McLeod f6251ace06 various
2017-10-22 11:37:58 +08:00

18 Zeilen
431 B
JavaScript

export default Ember.Route.extend({
beforeModel() {
const appModel = this.modelFor('custom');
if (appModel) {
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);
}
});