Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bypassing Angular URL routing

How do I bypass the routing provided by angular? For instance, in my angular routing settings, I have set $routeProvider.otherwise({redirectTo : '/someurl'});.

I want a certain request (generated by the user clicking a certain link in the HTML) to go to my webserver and not redirected to /someurl by Angular's routing. How do I do this?

like image 287
Amal Antony Avatar asked Dec 18 '13 11:12

Amal Antony


1 Answers

From the $location docs:

In cases like the following, links are not rewritten; instead, the browser will perform a full page reload to the original link.

Links that contain target element. Example: <a href="/ext/link?a=b" target="_self">link</a>

Absolute links that go to a different domain. Example: <a href="http://angularjs.org/">link</a>

Links starting with '/' that lead to a different base path when base is defined. Example: <a href="/not-my-base/link">link</a>

like image 165
Stewie Avatar answered Sep 19 '22 21:09

Stewie