IVY Problem - ngModel not working properly
See original GitHub issue🐞 Bug report
Command (mark with an x
)
- [x ] serve
Is this a regression?
YES
Description
After migrating to IVY some of the component stopped working or have weird behavior. where we get ngModel' since it isn't a known property of 'fd-time-picker
Normally you make sure that you have imported corect Module but this is not the case as when turning IVY off it works.
What is strage, when using this custom component which produces the error:
<fd-time-picker [compact]="true" [ngModel]="time" style="width: 300px;">
</fd-time-picker>
Removing compact
or style
binding from the template removes also the problem. So there must be some conflict.
🔬 Minimal Reproduction
https://github.com/JKMarkowski/angular-ivy-issue-example
🔥 Exception or Error
Template error: Can't bind to 'ngModel' since it isn't a known property of 'fd-time-picker'.
createUnknownPropertyError — core.js:12759
validateAgainstUnknownProperties — core.js:12698
elementPropertyInternal — core.js:12603
ɵɵproperty — core.js:19773
AppComponent_Template
executeTemplate — core.js:12177
checkView — core.js:13615
componentRefresh — core.js:13359
refreshChildComponents — core.js:11858
refreshDescendantViews — core.js:11757
renderComponentOrTemplate — core.js:12148
tickRootContext — core.js:13507
detectChangesInRootView — core.js:13543
detectChanges — core.js:15178
tick — core.js:41055
_loadComponent — core.js:41106
bootstrap — core.js:41029
forEach
🌍 Your Environment
Angular CLI: 8.3.8
Node: 11.0.0
OS: darwin x64
Angular: 8.2.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.8
@angular-devkit/build-angular 0.803.8
@angular-devkit/build-optimizer 0.803.8
@angular-devkit/build-webpack 0.803.8
@angular-devkit/core 8.3.8
@angular-devkit/schematics 8.3.8
@angular/cli 8.3.8
@ngtools/webpack 8.3.8
@schematics/angular 8.3.8
@schematics/update 0.803.8
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
Anything else relevant?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
ngModel value of select element as Ivy debugElement (unit ...
I am currently updating an application from angular 8 ...
Read more >Angular Forms: Why is ngModelChange late when updating ...
The problem In this snippet we're using the well known banana in a box syntax, which is the same as: [ngModel]='modelValue' (ngModelChange)='modelValue =...
Read more >NgModel - Angular
standalone: When set to true, the ngModel will not register itself with its parent form, and acts as if it's not in the...
Read more >Primeng dropdown controls not working after angular 9 ...
I have a p-dropdown control bound with ngModel to an object on my component. It's been working fine for a long while, I've...
Read more >angular ivy '@angular/forms' problem Code Example
Answers related to “angular ivy '@angular/forms' problem” ... errors: There is no directive with "exportAs" set to "ngModel" karma · ngsubmit does not...
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
Hi @trotyl, in the
next
version it works ok.Please check Ivy issue in
@next
version rather than@latest
.