'what is ([ngModel]) in angular? Is it reverse version of [(ngModel)]?

I konw what is two way data binding, but there is also ([ngModel]), It is reverse version of [(ngModel)]? then what is ([ngModel])? how it works?



Solution 1:[1]

([]) called a BANANA IN A BOX. We can say it's a sugre syntax for two parts: [ngModel] : to keep the view updated when the model is changing. (ngModelChange) : to keep model updated when the view is changing.

you can create your own two way binding : Example

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Souhail Chougrani