How does data binding work in AngularJS?

前端 未结 14 1568
情话喂你
情话喂你 2020-11-21 05:41

How does data binding work in the AngularJS framework?

I haven\'t found technical details on their site. It\'s more or less clear how it works when data

14条回答
  •  面向向阳花
    2020-11-21 06:02

    1. The one-way data binding is an approach where a value is taken from the data model and inserted into an HTML element. There is no way to update model from view. It is used in classical template systems. These systems bind data in only one direction.

    2. Data-binding in Angular apps is the automatic synchronisation of data between the model and view components.

    Data binding lets you treat the model as the single-source-of-truth in your application. The view is a projection of the model at all times. If the model is changed, the view reflects the change and vice versa.

提交回复
热议问题