Sarah Ibrahim
Sarah Ibrahim

Reputation: 63

(ngModelChange) works fine without adding [ngModel]?

I used ngModelChange without ngModel in an input in a form , it works fine , it's not supposed to work though, any explanation ?

the code

1

i expected it won't work without the ngModel but it works fine

Upvotes: 0

Views: 139

Answers (1)

Ivan Tarskich
Ivan Tarskich

Reputation: 1527

You are using the formControlName Directive

It has a @Output('ngModelChange') update: EventEmitter but its marked as deprecated since v6 so there is a chance it wont work with the next updateds.

Upvotes: 0

Related Questions