Open links in new window using AngularJS

后端 未结 7 1165
时光说笑
时光说笑 2020-11-27 04:17

Is there a way to tell AngularJS that I want links to be opened in new windows when the user clicks on them?

With jQuery I would do this:

jQuery(\"a.         


        
相关标签:
7条回答
  • 2020-11-27 05:01

    I wrote a small gist which I think can be very helpful to anybody seeking a solution to that problem: external link

    What it does is it adds target="_blank" attributes to anchor elements that would link to a domain different than the current one. You can patch it up to whatever you see fit.

    0 讨论(0)
提交回复
热议问题