Open links in new window using AngularJS

后端 未结 7 1210
时光说笑
时光说笑 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 04:44

    It works for me. Inject $window service in to your controller.

    $window.open("somepath/", "_blank")
    

提交回复
热议问题