ng9 strictTemplates issues
See original GitHub issueReproduction link
https://github.com/dylanvdmerwe/zorro-strictTemplates-repo
Steps to reproduce
In Angular 9, set strictTemplates to true in angularCompilerOptions in tsconfig.json. Run ng build on the repo.
Property 'subscribe' does not exist on type 'EventEmitter<any> | OnClickCallback<any>'.
Property 'subscribe' does not exist on type 'OnClickCallback<any>'.
Type 'NzSelectComponent' is missing the following properties from type 'NgModel': control, viewModel, name, isDisabled, and 34 more.
Disabling strictTemplates allows the code to run as expected.
The repo attached is just an example of what we have run into. I am sure there are additional components and cases that would need to be checked as well.
Some additional comments here: https://github.com/NG-ZORRO/ng-zorro-antd/issues/4757
Background info: https://auth0.com/blog/angular-9s-best-hidden-feature-strict-template-checking/
What is expected?
Ng-Zorro should not prevent the additional checks implemented by strictTemplates.
What is actually happening?
Typing errors prevent the code from compiling.
| Environment | Info |
|---|---|
| ng-zorro-antd | 9.1.0 |
| Browser | Chrome |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Angular 9's Best Hidden Feature: Strict Template Checking
Subtle bugs that could cause problems? Angular 9 and the Ivy compiler do just that. The new feature is known as strict template...
Read more >All Perks, No Hassle: An Angular 9 Tutorial - Toptal
A screenshot of an IDE showing the ng9-app folder, containing node_modules, . Now, let's add a new app. To do that, we will...
Read more >nrwl-nx/community - Gitter
I am using NX9 with NG9 ... that doesnt need to stay that way, I found the problem there ... if you want...
Read more >Newest 'angular9' Questions - Page 38 - Stack Overflow
Does anybody here have problems when trying to debug an Angular library with WebStorm? ... I have a simple trackBy statement which was...
Read more >Changelog - ngx-charts - GitBook
Bug: Fix typing issues to support enabling strictTemplates option. Breaking: Upgrade Angular to v12 ... 14.0.0. Chore: explicitly only suppot ng9 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you for this!
Hi, @dylanvdmerwe
fix via #5265;
need to specify the reference name to narrowing types.