Intercepting ng-click in angularJS

前端 未结 4 1328
一生所求
一生所求 2020-12-05 05:17

is it possible to write an interceptor for ng-click? I have a button or a link that leads to a deletion of an object in the backend. I\'d like to have a confirmation dialog

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 05:55

    You can inject $window into your controller so that you can use $window.confirm from your scope, then:

    Delete
    

提交回复
热议问题