0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00
Dieser Commit ist enthalten in:
Angus McLeod 2017-11-02 09:27:21 +08:00
Ursprung 80fccbf093
Commit 1425c1e783

Datei anzeigen

@ -2,8 +2,9 @@ export default {
name: 'custom-routes',
initialize(app) {
console.log('running initializer', app.constructor.name, app.get('rootElement'))
if (app.constructor.name !== 'Class' || app.get('rootElement') !== '#custom-wizard-main') return;
console.log('running custom initializer')
if (app.constructor.name !== 'Class' || typeof app.get !== 'function' ||
app.get('rootElement') !== '#custom-wizard-main') return;
const Router = requirejs('wizard/router').default;
const ApplicationRoute = requirejs('wizard/routes/application').default;
@ -24,6 +25,8 @@ export default {
});
});
console.log("added routes")
ApplicationRoute.reopen({
redirect() {
this.transitionTo('custom');