Skip to content

NgModel.viewToModelUpdate does not work after upgrading to Angular 6 #24783

@m-ermolaev

Description

@m-ermolaev

I'm submitting a...


[ x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

ngModel.viewToModelUpdate does not update model.

Expected behavior

ngModel.viewToModelUpdate should update model.

Minimal reproduction of the problem with instructions

You can check following demos with identical code, but different Angular versions. And see that directive in later of them does not update the model, while the other one do the thing.

Angular 4 demo
https://stackblitz.com/edit/angular4-viewtomodelupdate?file=app%2Fmask.directive.ts

Angular 6 demo
https://stackblitz.com/edit/angular6-viewtomodelupdate?file=app%2Fmask.directive.ts

What is the motivation / use case for changing the behavior?

I upgraded Angular from 4.4.3 to 6.0.7 and my custom directives completely broke.

Environment


Angular version: 6.0.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions