<input class="detail-reply"
id="replyInput"
type="text"
ng-model="$ctrl.replyString">
这个input使用ng-blur
是不会触发的,但是直接DOM绑定onblur
事件是会触发,为什么?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你用的是1还是2如果是2的话,可以
<input type="text" [(ngModel)]="myModel" (blur)="onBlurMethod()">
angular1的ng-blur要通过指令才能使用,指令的作用其实就是将ng-blur绑定的事件应用到onblur事件