1.

What is the difference between ng-model and ng-bind in AngularJs?

Answer»
Ng modelNg 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>


Discussion

No Comment Found