maiyaporn / angular2-wizard

Angular2 - Form Wizard Component
118 stars 119 forks source link

Exception when running in production mode #44

Open mariannafld opened 6 years ago

mariannafld commented 6 years ago

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

vinodkumar526 commented 6 years ago

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.

mariannafld commented 6 years ago

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.

muneer-memon commented 6 years ago

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

roblawford commented 6 years ago

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

ynnr85 commented 6 years ago

Any suggestions?

muneer-memon commented 6 years ago

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

k11k2 commented 6 years ago

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

muneer-memon commented 6 years ago

@AlwaysAbhl001 you should ask this question to the owner

satnar commented 5 years ago

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 commented 5 years ago

@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.

muneer-memon commented 5 years ago

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)