Explain property binding or one way binding in angular js.

devquora
devquora

Posted On: Feb 22, 2018

 

Basically, property binding means passing data from the component class and setting the value of a given element in the view. It is a one-way binding in which the data is passed from component to the class. It allows us to control the element property values from component to class. Property binding in angular can take place by three ways:

  • Interpolation can be used to define a value, as long as the value being defined is a string.
  • Wrapping brackets around the element property and binding it to the component property is the most common type of property binding.
  • The third way is by adding “bind” before the element property.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Angular 4 Interview Questions

    Explain component decorators in Angular4.

    A decorator is the core concept when developing an angular framework with version 2 and above. It may become a core lang..

    Angular 4 Interview Questions

    Write the CLI command to generate a component in Angular4.

    Components are just simple classes which are declared as components with the help of component decorators. It becomes e..

    Angular 4 Interview Questions

    Explain the component directory structure of angular4.

    Here are the elements which are present in the component directory structure anf modules:-module.ts- in this, the angu..