Câu hỏi phỏng vấn Angular
Câu hỏi

How do you categorize data binding types?

Câu trả lời

In Angular, data binding types can be categorized based on the direction of data flow between the component and the view. Here are the main categories:

  1. From the Source to the View (One-way)

    • Interpolation: Uses {{expression}} to bind data from the component to the view.
    • Property Binding: Uses [target]="expression" to bind properties of DOM elements to data in the component.
    • Attribute Binding: Uses bind-target="expression" for binding HTML attributes to component data.
    • Class Binding: Dynamically toggles CSS classes on elements.
    • Style Binding: Dynamically changes styles of elements.
  2. From the View to the Source (One-way)

    • Event Binding: Uses (target)="statement" to execute component methods when specified DOM events occur, such as clicks or mouse movements.
  3. From the View to the Source and Back to the View (Two-way)

    • **Two-w...
middle

middle

Gợi ý câu hỏi phỏng vấn

expert

Name some differences between SystemJS vs webpack ?

middle

When would you use eager module loading?

junior

What is the difference between *ngIf vs [hidden] What is the difference between *ngIf vs [hidden] ??

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào