如何使用时,让“打开一个新标签'NG点击? [英] How to allow 'Open in a new tab' when using ng-click?

查看:121
本文介绍了如何使用时,让“打开一个新标签'NG点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对HTML表中每一行导致不同的页面,有关该行的更多细节。但正如我用angularjs,与NG-点击我不能右键单击该行并选择在新标签中打开。有什么办法解决呢?

I have a table on HTML and each row leads to a different page, with more details about that row. But as I am using angularjs, with ng-click I can't right click this row and select 'open in a new tab'. Is there any way to solve it?

在此先感谢!

推荐答案

如果可能,应你的元素转换为锚元素。

<a ng-href="{{ your dynamic url }}" ng-click="your function">

浏览器会间preT元素为纽带,并会为此给你正确的下拉列表。
请注意,您还必须有正确的href的值在新标签中打开。

The browser will interpret the element as a link, and will therefor give you the correct dropdown. Note that you also have to have the correct href value to open in a new tab.

编辑:
我会建议<一href=\"http://stackoverflow.com/questions/890743/click-entire-row-$p$pserving-middle-click-and-ctrlclick\">this问题,如果你想如何解决这种使用JQuery的行为进行更详细的答案。

这篇关于如何使用时,让“打开一个新标签'NG点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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