1
私は@Input上doClean()関数を(実行したい
)cleanTextBoxanglejs2の@Inputパラメータにどのように機能を実行するのですか?
@Component({
selector: 'my-component',
providers: [],
template: `<input [(ngModel)]="abc">`,
directives: []
})
export class Directive {
@Input() cleanTextBox : boolean;
public abc = "someValue";
// Execute doClean function if cleanTextBox is true
public doClean{
this.abc = '';
}
}