aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/guide/dev_guide.services.$location.ngdoc
diff options
context:
space:
mode:
authorMisko Hevery2011-11-08 20:42:16 -0800
committerMisko Hevery2011-11-14 20:31:15 -0800
commitc283bf6035566aa8ff3178676a133de6878b5d1b (patch)
tree7840abc149b6b056a76ac5016756fed32e6364ab /docs/content/guide/dev_guide.services.$location.ngdoc
parentb3c17f3fdcf37403c5fb71f9916983a10e17c783 (diff)
downloadangular.js-c283bf6035566aa8ff3178676a133de6878b5d1b.tar.bz2
refactor($location): merged $locationConfig service into $locationProvider
Diffstat (limited to 'docs/content/guide/dev_guide.services.$location.ngdoc')
-rw-r--r--docs/content/guide/dev_guide.services.$location.ngdoc16
1 files changed, 6 insertions, 10 deletions
diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc
index 51747516..a8e79111 100644
--- a/docs/content/guide/dev_guide.services.$location.ngdoc
+++ b/docs/content/guide/dev_guide.services.$location.ngdoc
@@ -88,26 +88,22 @@ setter methods that allow you to get or change the current URL in the browser.
## $location service configuration
-To configure the `$location` service, you define the `$locationConfig` service which is an object
-with configuration properties:
+To configure the `$location` service, you get a hold of
+{@link angular.module.ng.$locationProvider $locationProvider} service and configure it with these
+methods:
-- **html5Mode**: {boolean}<br />
+- **html5Mode(mode)**: {boolean}<br />
`true` - see HTML5 mode<br />
`false` - see Hashbang mode<br />
default: `false`
-- **hashPrefix**: {string}<br />
+- **hashPrefix(prefix)**: {string}<br />
prefix used for Hashbang URLs (used in Hashbang mode or in legacy browser in Html5 mode)<br />
default: `'!'`
### Example configuration
<pre>
-angular.service('$locationConfig', function() {
- return {
- html5mode: true,
- hashPrefix: '!'
- };
-});
+$locationProvider.html5Mode(true).hashPrefix('!');
</pre>
## Getter and setter methods