Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Angular 9 #262

Merged
merged 9 commits into from Feb 16, 2020
Merged

Update to Angular 9 #262

merged 9 commits into from Feb 16, 2020

Conversation

madoar
Copy link
Owner

@madoar madoar commented Feb 8, 2020

Copy link
Owner Author

@madoar madoar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is ready to be merged. I've added some comments to some in my opinion important or interesting changes. If possible I would like for @earshinov to take a look at this PR to see whether he can find anything that I've missed.

If everything is ok I think we can merge this PR. Afterwards I would like to do some followup changes that are possible because of the newer typescript version we use now. Foremost I want to introduce Optional Chaining and Nullish Coalescing to make some routines more compact and maybe also easier to understand.

package.json Outdated Show resolved Hide resolved
@ViewChild(WizardComponent, {static: false})
@ViewChild(WizardComponent)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an automatic change by angular-cli

[ngStyle]="{ 'font-family': step.stepSymbolTemplate ? '' : step.navigationSymbol.fontFamily }">
[style]="{ 'font-family': step.stepSymbolTemplate ? '' : step.navigationSymbol.fontFamily }">
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Angular 9 allows the use of the style and class bindings in addition to the "legacy" ngStyle and ngClass directives. See also section "Improved CSS class and style binding" in https://blog.angular.io/version-9-of-angular-now-available-project-ivy-has-arrived-23c97b63cfa3

Comment on lines -478 to +472
expect(navBarEl.classes).toEqual({
'horizontal': true, 'vertical': false, 'small': false,
'large-filled': true, 'large-filled-symbols': false, 'large-empty': false, 'large-empty-symbols': false
});
expect(navBarEl.classes).toEqual({ 'horizontal': true, 'large-filled': true });
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the contract of classes has changed. The returned object now only contains the active classes, i.e. all classes that are true. This change affected 11 tests, which were "fixed" by me.

{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file has been generated by angular-cli. Most likely enableIvy should continue to be false because of here. @earshinov what do you think? Should we change the value to true?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right about using false. It needs to be false to preserve backward compatibility of angular-archwizard library with applications still using ViewEngine.

@earshinov
Copy link
Contributor

Looks good to me. I think it can be merged (save the peerDependencies discussed above)

@madoar
Copy link
Owner Author

madoar commented Feb 14, 2020

Ok I just tried to build the demo repository against this branch. Long story short it does not seem to work.

The initial problem was that typescript 3.7 contains some breaking changes compared to typescript 3.5. This also answers the question whether an Angular 9 library is compatible with an Angular 8 (or earlier) application. The answer seems to be no.

After trying to update the demo repository to Typescript 3.7.5 and Angular 9 as well by using:

ng update @angular/core @angular/cli --allow-dirty

I got the following errors when calling ng serve:

Compiling @angular/core : es2015 as esm2015

Compiling @angular/common : es2015 as esm2015

Compiling @angular/platform-browser : es2015 as esm2015

Compiling @angular/platform-browser-dynamic : es2015 as esm2015

Compiling @angular/forms : es2015 as esm2015

Compiling @angular/router : es2015 as esm2015

chunk {main} main.js, main.js.map (main) 2.01 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 684 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 169 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 1.37 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 340 kB [initial] [rendered]
Date: 2020-02-14T22:14:28.481Z - Hash: 42da8404296f780fcc46 - Time: 16670ms

ERROR in src/app/completion-step-basic/completion-step-basic.component.html:25:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

25   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/completion-step-basic/completion-step-basic.component.ts:5:16
    5   templateUrl: './completion-step-basic.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component CompletionStepBasicComponent.
src/app/completion-step-back-navigation/completion-step-back-navigation.component.html:25:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

25   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'" awEnableBackLinks>
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/completion-step-back-navigation/completion-step-back-navigation.component.ts:5:16
    5   templateUrl: './completion-step-back-navigation.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component CompletionStepBackNavigationComponent.
src/app/optional-steps/optional-steps.component.html:38:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

38   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/optional-steps/optional-steps.component.ts:5:16
    5   templateUrl: './optional-steps.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component OptionalStepsComponent.
src/app/default-navigation-mode/default-navigation-mode.component.html:37:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

37   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/default-navigation-mode/default-navigation-mode.component.ts:5:16
    5   templateUrl: './default-navigation-mode.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component DefaultNavigationModeComponent.
src/app/configurable-navigation-mode/configurable-navigation-mode.component.html:57:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

57   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/configurable-navigation-mode/configurable-navigation-mode.component.ts:5:16
    5   templateUrl: './configurable-navigation-mode.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component ConfigurableNavigationModeComponent.
src/app/free-navigation-mode/free-navigation-mode.component.html:50:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

50   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/free-navigation-mode/free-navigation-mode.component.ts:5:16
    5   templateUrl: './free-navigation-mode.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component FreeNavigationModeComponent.
src/app/free-navigation-mode/free-navigation-mode.component.html:105:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

105   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/free-navigation-mode/free-navigation-mode.component.ts:5:16
    5   templateUrl: './free-navigation-mode.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component FreeNavigationModeComponent.
src/app/default-wizard-step/default-wizard-step.component.html:37:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

37   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/default-wizard-step/default-wizard-step.component.ts:5:16
    5   templateUrl: './default-wizard-step.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component DefaultWizardStepComponent.
src/app/initially-completed-wizard-steps/initially-completed-wizard-steps.component.html:42:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

42   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/initially-completed-wizard-steps/initially-completed-wizard-steps.component.ts:5:16
    5   templateUrl: './initially-completed-wizard-steps.component.html',
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component InitiallyCompletedWizardStepsComponent.

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2020-02-14T22:14:33.573Z - Hash: 880413209ce45e690cf1
3 unchanged chunks
chunk {main} main.js, main.js.map (main) 726 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 198 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 3.38 MB [initial] [rendered]
Time: 4763ms
: Compiled successfully.
    
    ERROR in src/app/completion-step-basic/completion-step-basic.component.html:25:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    25   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/completion-step-basic/completion-step-basic.component.ts:5:16
        5   templateUrl: './completion-step-basic.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component CompletionStepBasicComponent.
    src/app/completion-step-back-navigation/completion-step-back-navigation.component.html:25:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    25   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'" awEnableBackLinks>
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/completion-step-back-navigation/completion-step-back-navigation.component.ts:5:16
        5   templateUrl: './completion-step-back-navigation.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component CompletionStepBackNavigationComponent.
    src/app/optional-steps/optional-steps.component.html:38:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    38   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/optional-steps/optional-steps.component.ts:5:16
        5   templateUrl: './optional-steps.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component OptionalStepsComponent.
    src/app/default-navigation-mode/default-navigation-mode.component.html:37:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    37   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/default-navigation-mode/default-navigation-mode.component.ts:5:16
        5   templateUrl: './default-navigation-mode.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component DefaultNavigationModeComponent.
    src/app/configurable-navigation-mode/configurable-navigation-mode.component.html:57:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    57   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/configurable-navigation-mode/configurable-navigation-mode.component.ts:5:16
        5   templateUrl: './configurable-navigation-mode.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component ConfigurableNavigationModeComponent.
    src/app/free-navigation-mode/free-navigation-mode.component.html:50:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    50   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/free-navigation-mode/free-navigation-mode.component.ts:5:16
        5   templateUrl: './free-navigation-mode.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component FreeNavigationModeComponent.
    src/app/free-navigation-mode/free-navigation-mode.component.html:105:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    105   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/free-navigation-mode/free-navigation-mode.component.ts:5:16
        5   templateUrl: './free-navigation-mode.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component FreeNavigationModeComponent.
    src/app/default-wizard-step/default-wizard-step.component.html:37:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    37   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/default-wizard-step/default-wizard-step.component.ts:5:16
        5   templateUrl: './default-wizard-step.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component DefaultWizardStepComponent.
    src/app/initially-completed-wizard-steps/initially-completed-wizard-steps.component.html:42:30 - error NG8002: Can't bind to 'stepTitle' since it isn't a known property of 'aw-wizard-completion-step'.
    1. If 'aw-wizard-completion-step' is an Angular component and it has 'stepTitle' input, then verify that it is part of this module.
    2. If 'aw-wizard-completion-step' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
    3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
    
    42   <aw-wizard-completion-step [stepTitle]="'Completion steptitle'">
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      src/app/initially-completed-wizard-steps/initially-completed-wizard-steps.component.ts:5:16
        5   templateUrl: './initially-completed-wizard-steps.component.html',
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Error occurs in the template of component InitiallyCompletedWizardStepsComponent.

After a bit of additional search I found out that these errors could be prevented by deactivating Ivy and aot.

After deactivating Ivy and aot ng serve succeeds but my browser shows a white window with the following error in the debug terminal:

Unhandled Promise rejection: Failed to load wizard.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load wizard.component.html undefined

I'm a bit clueless how to continue. @earshinov do you by chance have an idea?

@earshinov
Copy link
Contributor

Hmm, there shouldn't be so much trouble. I will try to take a look tomorrow.

earshinov added a commit to earshinov/angular-archwizard that referenced this pull request Feb 15, 2020
@earshinov
Copy link
Contributor

earshinov commented Feb 15, 2020

@madoar , you might have noticed that the demo project does not recognize the stepTitle input of the WizardCompletionStepComponent. To resolve the problem you just have to add @Directive() decorator to the WizardCompletionStep abstract class.

Angular migration script applies it automatically to the base WizardStep class, but misses WizardCompletionStep. I guess it is an oversight of the Angular team and they would appreciate a bug report (if there isn't one already).

I have pushed changes I had to make to

Also I would recommend to always build the library with enableIvy: false, i.e. remove tsconfig.lib.prod.js and write "angularCompilerOptions": { "enableIvy": false } into the root tsconfig.json.

@madoar
Copy link
Owner Author

madoar commented Feb 16, 2020

@earshinov thank you for investigating this! I've applied your commits to my branches.

Also I would recommend to always build the library with enableIvy: false, i.e. remove tsconfig.lib.prod.js and write "angularCompilerOptions": { "enableIvy": false } into the root tsconfig.json.

I'm not sure which other configuration files I need to modify, and how to modify them, to make this change work. Can you by chance do the necessary changes and I apply them afterwards on my branch?

@earshinov
Copy link
Contributor

Sure. Please see this commit: earshinov@e767542

@madoar
Copy link
Owner Author

madoar commented Feb 16, 2020

Sure. Please see this commit: earshinov/angular-archwizard@e767542

@earshinov thanks again for your help!

I've just pushed some additional changes/improvements. More specific I have:

  • updated the dependencies again using ng update
  • updated the README and package.json files with the new minimum supported Angular version 9

@earshinov could you please take another look at this PR and see if I have missed anything? If everything is all right I think we can merge this.

@madoar
Copy link
Owner Author

madoar commented Feb 16, 2020

I forgot to mention that it would also be nice if we could update the remaining packages that are kind of independent of Angular as well, e.g. scss-bundle. Sadly I couldn't get it working with scss-bundle version 3.

@earshinov
Copy link
Contributor

The changes look good to me. As for scss-bundle, it can be upgraded at a later date.

@madoar madoar merged commit 6e21a67 into develop Feb 16, 2020
@madoar madoar deleted the angular-9-update branch February 16, 2020 20:59
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.

None yet

2 participants