3
焦點事件,我有指令的輸入如何捕捉模糊或角指令
<input ng-model="inputModel" ng-disabled="ngDisabled || isLoading" value="{{value}}" type="{{type}}" placeholder="{{placeholder | translate}}">
我使用這個指令是這樣的:
<input-ext type="'text'" name="email" ng-model="registerCtrl.email" ng-blur="registerCtrl.test()" required></input-ext>
我想模糊後,我的指令內部執行模糊在input-ext中,對於控制器中的這個示例代碼,如何做到這一點?
向我們顯示該指令的JS。 –
要觸發模糊,您需要設置焦點。你可能需要$超時設置重點。 – YOU
檢查[this](http://stackoverflow.com/questions/14859266/input-autofocus-attribute)並最終[this](http://jsfiddle.net/HarshMehta/q2zcf5yp/)。 – road2victory