阅读背景:

使用$ window.location.href在Angular中重定向可以直接调用,但如果从另一个函数调用则不行

来源:互联网 

I'm trying to redirect from my Angular app to a non-angular page. If I have a redirect function on the $scope and invoke it directly from a UI element via ng-click it works as expected. If I call the function from within another $scope function, though, the page reloads or remains as is. I suspect there is a scoping issue here, but I can't tell what it is. I also tried $window.location.assign() and got the same result.I'm trying to redirect from my Angular app to a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: