Angularjs Normal Links with html5Mode

前端 未结 4 1054
忘了有多久
忘了有多久 2020-11-28 03:46

I am working with angularjs in html 5 mode. Which appears to take control of all href\'s on the page. But what if I want to have a link to something within the same domain o

4条回答
  •  [愿得一人]
    2020-11-28 04:05

    in HTML5 mode, there are three situations in which the A tag is not rewritten: from the angular docs

    • Links that contain a target attribute. Example: link
    • Absolute links that point to a different domain Example: link
    • Links starting with '/' that lead to a different base path when base is defined Example: link

    so your case would be 1. add target="_self"

提交回复
热议问题