From c283bf6035566aa8ff3178676a133de6878b5d1b Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Tue, 8 Nov 2011 20:42:16 -0800
Subject: refactor($location): merged $locationConfig service into
$locationProvider
---
docs/content/guide/dev_guide.services.$location.ngdoc | 16 ++++++----------
docs/src/templates/docs.js | 7 ++-----
2 files changed, 8 insertions(+), 15 deletions(-)
(limited to 'docs')
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}
+- **html5Mode(mode)**: {boolean}
`true` - see HTML5 mode
`false` - see Hashbang mode
default: `false`
-- **hashPrefix**: {string}
+- **hashPrefix(prefix)**: {string}
prefix used for Hashbang URLs (used in Hashbang mode or in legacy browser in Html5 mode)
default: `'!'`
### Example configuration
-angular.service('$locationConfig', function() {
- return {
- html5mode: true,
- hashPrefix: '!'
- };
-});
+$locationProvider.html5Mode(true).hashPrefix('!');
## Getter and setter methods
diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js
index 0c8d787a..09a9e708 100644
--- a/docs/src/templates/docs.js
+++ b/docs/src/templates/docs.js
@@ -152,9 +152,6 @@ function TutorialInstructionsCtrl($cookieStore) {
window.angular = window.angular || {};
angular.module = angular.module || {};
-angular.module.ngdocs = function($provide) {
- $provide.value('$locationConfig', {
- html5Mode: true,
- hashPrefix: '!'
- });
+angular.module.ngdocs = function($locationProvider) {
+ $locationProvider.html5Mode(true).hashPrefix('!');
};
--
cgit v1.2.3