From c92d5a2f62e106cf91790a8086503f2daf40401b Mon Sep 17 00:00:00 2001 From: Ash Date: Tue, 13 Aug 2013 08:08:09 +0100 Subject: [PATCH] Update dev_guide.services.$location.ngdoc Added a point about using Angular in the root of a domain with HTML5 urls and then trying to link to external paths within the same directory. Please see the following: Original issue: https://github.com/angular/angular.js/issues/3520#issuecomment-22393487 Solution: http://fiddle.jshell.net/fgHf6/3/ --- docs/content/guide/dev_guide.services.$location.ngdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc index fdfa2b0b5fa7..e30c4cc8be67 100644 --- a/docs/content/guide/dev_guide.services.$location.ngdoc +++ b/docs/content/guide/dev_guide.services.$location.ngdoc @@ -321,6 +321,8 @@ reload to the original link. Example: `link` - Links starting with '/' that lead to a different base path when base is defined
Example: `link` + +When running Angular in the root of a domain, along side perhaps a normal application in the same directory, you should set your base url for Angular to ```.``` and then prefix every route with ```.```. So now when you link to other locations that aren't routed by Angular, they won't be intercepted by the `otherwise` rule in your `$routeProvider`. ### Server side