angularjs disable button on $http/$q calls

前端 未结 9 909
失恋的感觉
失恋的感觉 2021-02-03 10:12

following the DRY principal, i want to write a button directive which keeps button disabled for the duration of $http class.

I want to do this so as to forbid user from

9条回答
  •  孤城傲影
    2021-02-03 11:05

    You could also consider setting a flag, and using the html tag fieldset and ng-disabled. Then you can control how long the yourDisableFlag is true based on $http calls, a $timeout, etc.

提交回复
热议问题