Web
Analytics
What is property Binding in Angular 4 | Angular | ASP.NET Tutorials

For Consultation : +91 9887575540

Stay Connected :

What is property Binding in Angular 4

 

One Way property Data Binding in Angular 4

Property Data binding in Angular 4

  • Property binding allows you to define element attribute values from the component class.
  • It is one-way data binding, as you can only set data from the component to the view.





 

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
template: `
<input type='text' value={{valueis}} />
<input type='text' [value]=valueis />
<input type='text' bind-value=valueis />
<input type='button' [disabled]=status value={{valueis}} />
`

})
export class AppComponent {
valueis='Click Me';
status=true;

}