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

refactor(calendar): replace deprecated ngOutletContext #200

Merged
merged 1 commit into from
Aug 31, 2017
Merged

refactor(calendar): replace deprecated ngOutletContext #200

merged 1 commit into from
Aug 31, 2017

Conversation

chunghha
Copy link
Contributor

Use ngTemplateOutletContext instead.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[X] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

My test app using ng-zorro-antd is compiled OK with Angular 5.0.0-beta.5 but not started, because the beta version removed deprecated ngOutletContext which is currently used in the calendar module, even though the module is not used from my app.

Error: Template parse errors:
Can't bind to 'ngOutletContext' since it isn't a known property of 'ng-template'.

  1. If 'ngOutletContext' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" *ngIf="dateCell"
    [ngTemplateOutlet]="dateCell"
    [ERROR ->][ngOutletContext]="{ $implicit: day}">

    <"): ng:///NzCalendarModule/NzCalendarComponent.html@79:26

Issue Number: N/A

What is the new behavior?

With this commit, expect that the error above disappears when my app starts.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

Use ngTemplateOutletContext instead.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 40.348% when pulling 052ade6 on chunghha:template into e861e58 on NG-ZORRO:master.

@vthinkxie vthinkxie merged commit c9e8c98 into NG-ZORRO:master Aug 31, 2017
@chunghha chunghha deleted the template branch August 31, 2017 08:18
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