maiyaporn/angular2-wizard

Exception when running in production mode

Opened this issue · 11 comments

Hello,
Wizard in ng serve --o works perfect, but in production mode
ng build --prod, throws exception

ERROR TypeError: p.ngOnInit is not a function
    at main.593d15b004653eafc611.bundle.js:formatted:11116

at the transpiled code

Ka["\u0275ted"](-1, null, ["\n"]))], function(t, e) {
                var n = e.component;
                t(e, 3, 0),
                t(e, 7, 0, "Step 1: Define Channel"),
                t(e, 10, 0),
                t(e, 14, 0, "Step 2: Configure Channel"),
                t(e, 17, 0, Ka["\u0275nov"](e, 10).defineChannelForm, n.channelMode)
            }, null)

Thank you

Even I am facing similar issue with wizardComponent access specifiers

Version:
ng->5.0.0
cli->1.6.3
"angular2-wizard": "^0.2.2",

If I run production command "ng build -prod"
I am getting below errors.

ERROR in node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(4,30): : Property 'steps' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(12,30): : Property 'isCompleted' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(13,89): : Property 'hasPrevStep' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(13,89): : Property 'activeStep' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(14,86): : Property 'activeStep' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(14,119): : Property 'hasNextStep' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(14,119): : Property 'activeStep' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(15,90): : Property 'activeStep' is private and only accessible within class 'WizardComponent'.
node_modules\angular2-wizard\src\wizard.component.ts.WizardComponent.html(15,123): : Property 'hasNextStep' is private and only accessible within class 'WizardComponent'.

Please give me some solution ASAP to overcome this or could you please tell me the different version to update the current Wizard.

vinodkumar526, Hi
I tried to find a solution with no luck and I switched to angular material stepper. It works perfect in development and production.

@maiyaporn do you have any suggestion for using in prod mode? i am facing the same .ngOnInit is not a function in prod mode

Any suggestions @maiyaporn? Or should we just bin this component in favor for material stepper as @mariannafld mentioned???

Any suggestions?

Hi,
someone forked this repo and resolved this issue. it gives no error on prod mode.
https://github.com/Zwapgrid/angular2-wizard

k11k2 commented

@muneer-memon Sure ? then why cant they(owner) resolve this.

@AlwaysAbhl001 you should ask this question to the owner

Hi,
someone forked this repo and resolved this issue. it gives no error on prod mode.
https://github.com/Zwapgrid/angular2-wizard

Thanks @muneer-memon for this link. The README in that repo also refers to original angular2-wizard only. How do I install and use this variant in my project to get rid of the production mode issue? Your help in throwing some light in the right direction is much appreciated :)

@muneer-memon Sure ? then why cant they(owner) resolve this.
because the person fixed it has changed its package name and owner doesnt want that.

Hi,
someone forked this repo and resolved this issue. it gives no error on prod mode.
https://github.com/Zwapgrid/angular2-wizard

Thanks @muneer-memon for this link. The README in that repo also refers to original angular2-wizard only. How do I install and use this variant in my project to get rid of the production mode issue? Your help in throwing some light in the right direction is much appreciated :)

you can either use that package or get that code in your local project if you need further customization(which i did)