简体   繁体   中英

Angular Terminology/Data binding

I'm a little bit confused regarding the different terms in Angular and their relationships.

Do I understand the following terminology and their relationship to each other right?

Data binding is the main term which means passing data from the class to the HTML template of the same, child or parent component or from the HTML component back to the class.

Interpolation, Directives, Pipes, property, class, event, style binding and are forms of data-binding.

Directives are the conditional altercation of the DOM.

Data binding is how you pass data from one component to another component. For that, you can use components directives and pipes.

A component renders its own template. Directives are decorators of elements and components when you need to change the DOM, but it doesn't depend on a render of a particular template (for example, to add an CSS class or an attribute to an existing element).

Data binding is the core of the way to pass data between a template and a component. Angular is based on the two ways data binding:

https://stackoverflow.com/questions/13504906/what-is-two-way-binding#:~:text=Two%2Dway%20binding%20means%20that,does%20the%20UI%2C%20and%20conversely .

Interpolation refers to embedding expressions into marked up text (template expression).

Pipe will modify text in a template expression (interpolation):

https://angular.io/guide/pipes

Directive is used to modify the behavior of DOM elements. Be careful with different kind of directives.

https://angular.io/guide/attribute-directives

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM