0
在我的應用程序中,我使用許多頁面的表單驗證。如果我想專注於無效輸入元素如何使用,而無需在每個元素的指令中設置true或false。如何使用ng.model在角度js中動態地聚焦輸入元素[不是首先]
<input type="text" ng-model="username" focus-me="isError"/>
在controller.js:
if(scope.username == "")
{
scope.isError = true;
}
代替使用像上面的代碼,是否有任何方式使用NG-模型集中?