7.7k views
1 vote
Two way binding [(ngModule)] = "attrname"

Option 1:
It binds a model property to a template attribute.

Option 2:
It is used for one-way data binding.

Option 3:
It defines a module in Angular.

Option 4:
It is not a valid Angular syntax.

User Huseyin
by
8.1k points

1 Answer

3 votes

Final answer:

[(ngModule)] = "attrname" is a two-way binding used in Angular to bind a model property to a template attribute.

Step-by-step explanation:

The subject of this question is Computers and Technology and the grade level is High School.

  1. The correct option is Option 1: It binds a model property to a template attribute. Two-way binding [(ngModule)] = "attrname" allows data to flow in both directions, enabling changes in the template attribute to update the model property and vice versa.
  2. Option 2 is incorrect. One-way data binding is represented by [(ngModel)] = "attrname", where changes in the template attribute update the model property, but changes in the model property do not affect the template attribute.
  3. Option 3 is incorrect. [(ngModule)] = "attrname" does not define a module in Angular.
  4. Option 4 is incorrect. [(ngModule)] = "attrname" is a valid Angular syntax.
User Nojevive
by
8.6k points

No related questions found