Disable ng-click on certain conditions of application for all types of element

前端 未结 1 1280
终归单人心
终归单人心 2020-12-23 17:41

In my application I\'ve binded several elements with ng-click directive like below


相关标签:
1条回答
  • 2020-12-23 17:47

    Do like this:

    <button ng-click="!IsClickEnable||DoSomethingElse()">xyz</button>
    

    when the value of IsClickEnable is true then the function will be called on the button click then the function 'DoSomethingElse()' will be called else it will not get called

    0 讨论(0)
提交回复
热议问题