angularjs NG单击并锚的href [英] angularjs ng-click and href on anchor

查看:218
本文介绍了angularjs NG单击并锚的href的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有一个NG-点击A HREF一起锚的NG-点击不起作用。我想这两个工作,如果可能的话,去的路线,然后运行功能。我用例是我有一个链接面板,去一个链接我要关上抽屉时,打开一个抽屉。

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 have a drawer open with a panel of links, when going to a link I want to close the drawer.

什么是一个简单的方法来获得在同一时间两个工作?

What's an easy way to get both working at the same time?

推荐答案

这个问题问了错误的事情。使用href和吴单击一起工作完全正常,我只是在prevented任何角度绑定从所有工作的父元素的用户界面视图。

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.

这篇关于angularjs NG单击并锚的href的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆