如何删除与[[ngModel)]成角度的双向绑定?
我想要一个单独的处理程序来设置值,另一个用于更改它。所以我会有副作用
例如
<input [(ngModel)]="selectedEscrowOffering" [ngbTypeahead]="search" [resultFormatter]="escrowFormatter">
在Vue中,模型被认为是合成糖。
我可以将指令和onChangeHandler分开两种方式吗?
<input [value]="selectedEscrowOffering" (change)="someFunctionName($event)" [ngbTypeahead]="search" [resultFormatter]="escrowFormatter">
与vue非常相似,您可以按以下方式将@Output
和@Input
分开:<input (ngModelChange)="someFunctionName($event)" [ngModel]="mymodel">