What is the difference between ng-model and ng-bind in AngularJs?
Ng model | Ng bind |
---|---|
This works as a two-way data binding where the user has to bind a variable to the field and output the same variable wherever the user desire to display that updated value anywhere in the application. The syntax used for ng-model is – <textarea ng-model="propertyName"></textarea> |
It's a one-way data-binding used by developers for displaying the value inside HTML component as inner HTML. The syntax used for ng-bind is – <div ng-bind="propertyName"></div> |
BY Best Interview Question ON 25 Aug 2019