admin管理员组文章数量:1389196
I am trying to open a new tab with a specific url.
When i enter
$window.open('www.example', '_blank')
i do get a new tab, just like i wanted but instead of going to: www.example
im directed to: http://localhost:8080/www.example
It concatinates my input with my current address
How do i open a new tab with exactly the url i put in the input?
Thanks!
I am trying to open a new tab with a specific url.
When i enter
$window.open('www.example.', '_blank')
i do get a new tab, just like i wanted but instead of going to: www.example.
im directed to: http://localhost:8080/www.example.
It concatinates my input with my current address
How do i open a new tab with exactly the url i put in the input?
Thanks!
Share Improve this question asked Jul 15, 2015 at 13:51 JonathanJonathan 231 silver badge3 bronze badges1 Answer
Reset to default 4Did you try $window.open('http://www.example.', '_blank')
(that is, add http://
so it's not interpreted as a relative URL)?
本文标签:
版权声明:本文标题:javascript - AngularJS $window.open('url', '_blank') directs to currentpath+url instead of url - 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744611487a2615683.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论