This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
$location, html5 enabled urls, routing non-defined routes. #3520
Comments
@zivc kindly simplified my jsfiddle example on his domain. These two bugs are duplicates then although it is useful having two examples of the problem. |
I agree. And if @zivc could change the |
@rdjs @danielcha Confusion here, lets keep discussion on this issue about the examples mentioned above - more specifically, running Angular at the root of a domain. Refer to issue #3511 for other issues when using |
petebacondarwin
pushed a commit
that referenced
this issue
Sep 18, 2013
When using Angular in the root of a domain with HTML5 URLs where there are links to external paths within the same directory, the `otherwise` route handler will catch these external files. This can be fixed by prefixing '.' onto the links to URLs that should be handled by angular routing. Original Issue: #3520 Example of Fix: http://fiddle.jshell.net/fgHf6/3/ Closes #3555
petebacondarwin
pushed a commit
that referenced
this issue
Sep 18, 2013
When using Angular in the root of a domain with HTML5 URLs where there are links to external paths within the same directory, the `otherwise` route handler will catch these external files. This can be fixed by prefixing '.' onto the links to URLs that should be handled by angular routing. Original Issue: #3520 Example of Fix: http://fiddle.jshell.net/fgHf6/3/ Closes #3555
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Sep 25, 2013
When using Angular in the root of a domain with HTML5 URLs where there are links to external paths within the same directory, the `otherwise` route handler will catch these external files. This can be fixed by prefixing '.' onto the links to URLs that should be handled by angular routing. Original Issue: angular#3520 Example of Fix: http://fiddle.jshell.net/fgHf6/3/ Closes angular#3555
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this issue
Jan 27, 2014
When using Angular in the root of a domain with HTML5 URLs where there are links to external paths within the same directory, the `otherwise` route handler will catch these external files. This can be fixed by prefixing '.' onto the links to URLs that should be handled by angular routing. Original Issue: angular#3520 Example of Fix: http://fiddle.jshell.net/fgHf6/3/ Closes angular#3555
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is an issue to spur discussion regarding updating some documentation at http://doc.angularjs.org
Please refer to the documentation here, under the heading "Html link rewriting"
Please also refer to here as a working example:
When running your Angular app from the
/
location (root of a domain), if you try to link to locations outside of the routes defined in Angular - whether it be static files or directories, Angular still tries to route it.The documentation states:
In the URL example above we can see that this isn't the case for the last statement, you see our app runs from
/
, and we also have a link to a directory called/outside/
which exists and isn't rewrote by the web server either. The same results are achieved even if we put in the full path such as/outside/index.php
otherwise
routes and do the error handling/complex server side routing in nginx/apache etc?target="_self"
actually be an advised requirement for any persons using Angular at the root of a domain when linking to a physical resource within the same domain to make it more resilient?Update, found this on Stackoverflow, prefixing all
hrefs
that reference Angular routes with a.
seems to solve the problems described above: http://fiddle.jshell.net/fgHf6/3/Can we get the documentation updated to reflect this?
Regards,
angularjs @ Freenode
The text was updated successfully, but these errors were encountered: