binding properties angular code example
Example 1: angular binding
<input [disabled]="condition ? true : false">
<input [attr.disabled]="condition ? 'disabled' : null">
Example 2: angular property binding
import { Component } from "@angular/core";
@Component({
selector: 'app-example',
template: `
<div>
<input [value]='myText'></span>
</div>
`
})
export class AppComponent {
myText: string = "Hello World";
}