Navigate to URLs outside of the Angular application with target=”_self”

Today I brought in Angular’s routing to a view I was working on, clicked on a link which is on the same server but outside of the Angular application, and my browser’s URL updated, but the screen was just blank. Angular had hijacked the link and tried to route to the href itself.

I found the solution in the Angular Google Group.

<a href="/someUrl/inTheSameDomain" target="_self">
A link outside the Angular app
</a>

Adding target=”_self” to the link makes it so that Angular won’t use its own routing to try to navigate to that URL.

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Navigate to URLs outside of the Angular application with target=”_self”

Comments are closed.