Angular 1 does not accept onchange()
event, it's only accepts ng-change()
event.
(Angular 1不接受onchange()
事件,仅接受ng-change()
事件。)
Angular 2, on the other hand, accepts both (change)
and (ngModelChange)
events, which both seems to be doing the same thing.
(另一方面,Angular 2接受(change)
和(ngModelChange)
事件,它们似乎都在做相同的事情。)
What's the difference?
(有什么不同?)
which one is best for performance?
(哪个最适合表现?)
ngModelChange :
(ngModelChange :)
<input type="text" pInputText class="ui-widget ui-text"
(ngModelChange)="clearFilter()" placeholder="Find"/>
vs change :
(vs 变化 :)
<input type="text" pInputText class="ui-widget ui-text"
(change)="clearFilter()" placeholder="Find"/>
ask by Ramesh Rajendran translate from so