Stay on current page when open new tab in angular

2019-08-09 17:56发布

<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');
 };  

I am try to make when some one click on "CLICK Here" then need to open new window but need stay on current tab.

In my code current tab open in page its ok but popup also gone because of it refresh the page . I am using angular js 1.2.17 and for popup i am using bootstrap.js v3.0.0

1条回答
小情绪 Triste *
2楼-- · 2019-08-09 18:48

If you don't want to refresh the page, then use an empty href attribute.

查看更多
登录 后发表回答