angularjs ng-click and href on anchor

后端 未结 2 1038
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 21:47

If there\'s an ng-click and a href together on an anchor the ng-click doesn\'t work. I want both to work if possible, go to a route and then run a function. My use-case is I

2条回答
  •  再見小時候
    2021-01-18 22:07

    The question was asking for the wrong thing. Using the href and the ng-click together works perfectly fine, I just had an ui-view in the parent element that prevented any angular bindings from working at all.

提交回复
热议问题