angular binding
<input [disabled]="condition ? true : false">
<input [attr.disabled]="condition ? 'disabled' : null">
angular binding
<input [disabled]="condition ? true : false">
<input [attr.disabled]="condition ? 'disabled' : null">
data binding in angular
content_copy
<app-sizer [(size)]="fontSizePx"></app-sizer>
property binding angular documentation
// component.ts
@Component({
templateUrl: 'component.html',
selector: 'app-component',
})
export class Component {
name = 'Peter';
updateName() {
this.name = 'John';
}
}
// component.html
<p>My name is {{name}}</p>
<button (click)="updateName()">Update button</button>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us