0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-23 09:50:28 +01:00
discourse-custom-wizard/assets/javascripts/wizard/routes/custom-index.js.es6
Angus McLeod e859e3efa2 various
2017-10-13 21:02:34 +08:00

15 Zeilen
394 B
JavaScript

export default Ember.Route.extend({
beforeModel() {
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);
}
});