我正在使用$location.path('www.google.com');
打开外部链接,但不会覆盖该网址,因此它会将我带到app.js
我也使用$window.open
,但它没有做任何事情。
如何打开外部链接,最好是在新标签中?
myApp.service('GetUrl', ['$http', '$window', function ($http, $window) {
this.ToUrl = function(file, url){
$http.post('/geturl')
.success(function(respond){
//I'm getting respond as https://demo.docusign.net/
window.open(respond); //this is were I have performed redirection here server sends the response but window.open or $window.open is not performing anything it just stays in the same page
})
.error(function(){
});
}
}]);
答案 0 :(得分:0)
抱歉,这是firefox阻止重定向而不是angular。谢谢你的帮助。