diff options
Diffstat (limited to 'docs/content/guide/dev_guide.services.$location.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.services.$location.ngdoc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc index 8f7a596a..57739f9f 100644 --- a/docs/content/guide/dev_guide.services.$location.ngdoc +++ b/docs/content/guide/dev_guide.services.$location.ngdoc @@ -87,7 +87,7 @@ setter methods that allow you to get or change the current URL in the browser. ## $location service configuration To configure the `$location` service, retrieve the -{@link api/ng.$locationProvider $locationProvider} and set the parameters as follows: +{@link ng.$locationProvider $locationProvider} and set the parameters as follows: - **html5Mode(mode)**: {boolean}<br /> @@ -138,7 +138,7 @@ current URL without creating a new browser history record you can call: ``` Note that the setters don't update `window.location` immediately. Instead, the `$location` service is -aware of the {@link api/ng.$rootScope.Scope scope} life-cycle and coalesces multiple `$location` +aware of the {@link ng.$rootScope.Scope scope} life-cycle and coalesces multiple `$location` mutations into one "commit" to the `window.location` object during the scope `$digest` phase. Since multiple changes to the $location's state will be pushed to the browser as a single change, it's enough to call the `replace()` method just once to make the entire "commit" a replace operation @@ -509,11 +509,11 @@ In this examples we use `<base href="/base/index.html" />` The `$location` service allows you to change only the URL; it does not allow you to reload the page. When you need to change the URL and reload the page or navigate to a different page, please -use a lower level API, {@link api/ng.$window $window.location.href}. +use a lower level API, {@link ng.$window $window.location.href}. ## Using $location outside of the scope life-cycle -`$location` knows about Angular's {@link api/ng.$rootScope.Scope scope} life-cycle. When a URL changes in +`$location` knows about Angular's {@link ng.$rootScope.Scope scope} life-cycle. When a URL changes in the browser it updates the `$location` and calls `$apply` so that all $watchers / $observers are notified. When you change the `$location` inside the `$digest` phase everything is ok; `$location` will @@ -635,7 +635,7 @@ then uses the information it obtains to compose hashbang URLs (such as ## Two-way binding to $location The Angular's compiler currently does not support two-way binding for methods (see [issue](https://github.com/angular/angular.js/issues/404)). If you should require two-way binding -to the $location object (using {@link api/ng.directive:input.text +to the $location object (using {@link ng.directive:input.text ngModel} directive on an input field), you will need to specify an extra model property (e.g. `locationPath`) with two watchers which push $location updates in both directions. For example: @@ -661,7 +661,7 @@ function LocationController($scope, $location) { # Related API -* {@link api/ng.$location $location API} +* {@link ng.$location $location API} |
