在角度js中打开新选项卡时保持当前页面

时间:2014-08-09 07:43:46

标签: angularjs twitter-bootstrap-3 angularjs-directive angular-ui-bootstrap

<a class="seecode_button" href="#{{w.CouponID}}" ng-click="newwindow(w)" data-toggle="modal" data-target="#{{w.CouponID}}">CLICK Here</a>

$scope.newwindow = function(w) {
    $window.open(w.LandingPageURL, '_self');
    $window.open('#','_blank');
 };  

当我点击一下&#34;点击这里&#34;然后需要打开新窗口,但需要留在当前选项卡上。

在我的代码当前选项卡中打开页面确定但弹出窗口也因为刷新页面而消失。我使用角度js 1.2.17和popup我使用bootstrap.js v3.0.0

1 个答案:

答案 0 :(得分:0)

如果您不想刷新页面,请使用空的href属性。

相关问题