2014-09-04 5 views
0

나는 외부 링크를 엽니 다 $location.path('www.google.com');을 사용하고 있습니다, 그러나 나는 또한 $window.open 사용 app.jsangularjs에서 외부 URL로 페이지를 리디렉션하는 방법은 무엇입니까?

에 달리으로 정의 된 URL에 데려가되도록 URL이 무시되지하지만 아무것도하지 않았다.

외부 링크는 어떻게하면 새 탭에서 열 수 있습니까?

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(){ 
     }); 
    } 
}]); 
+1

'window.open ("http://www.google.com"); ' – Sunand

+0

아니요, 나던 작동하지 않습니다. – jyoti

+0

질문을 사용중인 코드로 업데이트 할 수 있습니까? 'window.open()'을 사용하면 작동하지만 응용 프로그램에서 작동하지 않으면 그 이유를 알기 위해 코드를 볼 필요가 있습니다. –

답변

0

죄송합니다. 파이어 폭스는 각도보다 리디렉션을 방지합니다. 도와 주셔서 감사합니다.

관련 문제