AngularJS ng-click fires twice

后端 未结 18 1790
死守一世寂寞
死守一世寂寞 2020-12-03 07:10

I am using ng-click and it fires twice when I apply it to SPAN tag.

HTML

18条回答
  •  不思量自难忘°
    2020-12-03 07:48

    elements wrapped one another, and this can cause trigger event twice or more.

    So i used a simple CSS trick for this solution :

    .off{
       pointer-events:none;
    }
    

    and apply it to an element correspond to click event.

提交回复
热议问题