Skip to content

Conversation

@MoGnedy
Copy link

@MoGnedy MoGnedy commented Apr 22, 2018

fix "h.ngoninit is not a function" error while building AOT production.

@MoGnedy MoGnedy changed the title fix aot issue Fix AOT issue Apr 22, 2018
@MoGnedy MoGnedy changed the title Fix AOT issue Fix AOT build issue Apr 22, 2018
@JCarlosMartinez
Copy link

Hello,
I'm trying to add your fix to my project but I can't compile it. When running command "npm run tsc" I'm getting a lot of errors. @MoGnedy Is this the way to compile it? Thanks!!

npm run tsc

[email protected] tsc C:\projects\myproject\node_modules\angular2-wizard
tsc

../@angular/common/src/directives/ng_class.d.ts(48,34): error TS2304: Cannot find name 'Set'.
../@angular/core/src/change_detection/differs/default_iterable_differ.d.ts(12,32): error TS2304: Cannot find name 'Iterable'.
../@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,16): error TS2304: Cannot find name 'Map'.
../@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(32,16): error TS2304: Cannot find name 'Map'.
../@angular/core/src/change_detection/differs/iterable_differs.d.ts(14,48): error TS2304: Cannot find name 'Iterable'.
../@angular/core/src/change_detection/differs/keyvalue_differs.d.ts(22,18): error TS2304: Cannot find name 'Map'.
../@angular/core/src/di/reflective_provider.d.ts(87,123): error TS2304: Cannot find name 'Map'.
../@angular/core/src/di/reflective_provider.d.ts(87,165): error TS2304: Cannot find name 'Map'.
src/wizard.component.ts(68,23): error TS2339: Property 'find' does not exist on type 'WizardStepComponent[]'.
src/wizard.component.ts(68,28): error TS7006: Parameter 'step' implicitly has an 'any' type.
../rxjs/Observable.d.ts(58,60): error TS2693: 'Promise' only refers to a type, but is being used as a value here.
../rxjs/Observable.d.ts(74,59): error TS2693: 'Promise' only refers to a type, but is being used as a value here.

@faizalrazak
Copy link

Hi @MoGnedy i have changed all 3 files accroding to your commit. But theres still error "p.ngOnInit is not a function", and the wizard not come out. can u help me?

@MoGnedy
Copy link
Author

MoGnedy commented Dec 27, 2018

@JCarlosMartinez
@faizalrazak
You can use this fork, i am using it with Angular V 5.2.4.
https://github.com/MoGnedy/angular2-wizard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants