From 9eafd10fcdf8846194bbc325fe23fd3d6d9da155 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 20 Mar 2012 12:05:57 -0700 Subject: docs(guide/location): fix example --- .../guide/dev_guide.services.$location.ngdoc | 42 +++++++++++----------- 1 file changed, 20 insertions(+), 22 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 5c93970f..f5790725 100644 --- a/docs/content/guide/dev_guide.services.$location.ngdoc +++ b/docs/content/guide/dev_guide.services.$location.ngdoc @@ -372,13 +372,13 @@ In this examples we use ``

Browser with History API

-

- $location.protocol() = {{$location.protocol()}}
- $location.host() = {{$location.host()}}
- $location.port() = {{$location.port()}}
- $location.path() = {{$location.path()}}
- $location.search() = {{$location.search()}}
- $location.hash() = {{$location.hash()}}
+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
/base/first?a=b | sec/ond?flag#hash | external @@ -386,13 +386,13 @@ In this examples we use ``

Browser without History API

-

- $location.protocol() = {{$location.protocol()}}
- $location.host() = {{$location.host()}}
- $location.port() = {{$location.port()}}
- $location.path() = {{$location.path()}}
- $location.search() = {{$location.search()}}
- $location.hash() = {{$location.hash()}}
+


+ $location.protocol() = {{$location.protocol()}}
+ $location.host() = {{$location.host()}}
+ $location.port() = {{$location.port()}}
+ $location.path() = {{$location.path()}}
+ $location.search() = {{$location.search()}}
+ $location.hash() = {{$location.hash()}}
/base/first?a=b | sec/ond?flag#hash | external @@ -417,7 +417,6 @@ In this examples we use `` return baseHref; }; - this.hover = angular.noop; this.notifyWhenOutstandingRequests = angular.noop; } @@ -426,20 +425,19 @@ In this examples we use `` hashbang: new FakeBrowser('http://www.host.com/base/index.html#!/path?a=b#h', '/base/index.html') }; - function Html5Cntl($location) { - this.$location = $location; + function Html5Cntl($scope, $location) { + $scope.$location = $location; } - function HashbangCntl($location) { - this.$location = $location; + function HashbangCntl($scope, $location) { + $scope.$location = $location; } function initEnv(name) { var root = angular.element(document.getElementById(name + '-mode')); angular.bootstrap(root, [function($compileProvider, $locationProvider, $provide){ - $locationProvider.html5Mode = true; - $locationProvider.hashPrefix = '!'; - + $locationProvider.html5Mode(true).hashPrefix('!'); + $provide.value('$browser', browsers[name]); $provide.value('$document', root); $provide.value('$sniffer', {history: name == 'html5'}); -- cgit v1.2.3