aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2011-10-13 14:07:35 -0700
committerIgor Minar2011-10-13 14:07:48 -0700
commit7a19eb84aa3df39f42e42a4e4ac0b169862119be (patch)
treec11c16d5be55f642dc1e6086583d266d246675e2
parent718741acab907a88682387f587d5342e3fcd40d2 (diff)
downloadangular.js-7a19eb84aa3df39f42e42a4e4ac0b169862119be.tar.bz2
docs($location): fix $config -> $locationConfig in docs
-rw-r--r--docs/content/guide/dev_guide.services.$location.ngdoc12
-rw-r--r--src/service/location.js8
2 files changed, 10 insertions, 10 deletions
diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc
index fa8238fe..a50bb01b 100644
--- a/docs/content/guide/dev_guide.services.$location.ngdoc
+++ b/docs/content/guide/dev_guide.services.$location.ngdoc
@@ -88,8 +88,8 @@ 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 `$config` service which is an object with
-configuration properties:
+To configure the `$location` service, you define the `$locationConfig` service which is an object
+with configuration properties:
- **html5Mode**: {boolean}<br />
`true` - see Html5 mode<br />
@@ -102,7 +102,7 @@ configuration properties:
### Example configuration
<pre>
-angular.service('$config', function() {
+angular.service('$locationConfig', function() {
return {
html5mode: true,
hashPrefix: '!'
@@ -205,7 +205,7 @@ In this mode, `$location` uses Hashbang URLs in all browsers.
### Example
<pre>
-angular.service('$config', function() {
+angular.service('$locationConfig', function() {
return {
html5Mode: false,
hashPrefix: '!'
@@ -253,7 +253,7 @@ having to worry about whether the browser displaying your app supports the histo
### Example
<pre>
-angular.service('$config', function() {
+angular.service('$locationConfig', function() {
return {
html5Mode: true,
hashPrefix: '!'
@@ -456,7 +456,7 @@ ng:ext-link>external</a>
function initEnv(name) {
var root = angular.element(document.getElementById(name + '-mode'));
var scope = angular.scope(null, {
- $config: {html5Mode: true, hashPrefix: '!'},
+ $locationConfig: {html5Mode: true, hashPrefix: '!'},
$browser: browsers[name],
$document: root,
$sniffer: {history: name == 'html5'}
diff --git a/src/service/location.js b/src/service/location.js
index 356dfc21..6e01d669 100644
--- a/src/service/location.js
+++ b/src/service/location.js
@@ -400,7 +400,7 @@ function locationGetterSetter(property, preprocess) {
*
* @requires $browser
* @requires $sniffer
- * @requires $config
+ * @requires $locationConfig
* @requires $document
*
* @description
@@ -419,14 +419,14 @@ function locationGetterSetter(property, preprocess) {
*
* For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular Services: Using $location}
*/
-angularServiceInject('$location', function($browser, $sniffer, $config, $document) {
+angularServiceInject('$location', function($browser, $sniffer, $locationConfig, $document) {
var scope = this, currentUrl,
basePath = $browser.baseHref() || '/',
pathPrefix = pathPrefixFromBase(basePath),
- hashPrefix = $config.hashPrefix || '',
+ hashPrefix = $locationConfig.hashPrefix || '',
initUrl = $browser.url();
- if ($config.html5Mode) {
+ if ($locationConfig.html5Mode) {
if ($sniffer.history) {
currentUrl = new LocationUrl(convertToHtml5Url(initUrl, basePath, hashPrefix), pathPrefix);
} else {