mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-29 05:15:38 +08:00
docs(guide/location): fix example code - hashPrefix is a method
This commit is contained in:
committed by
Pete Bacon Darwin
parent
52c538c269
commit
48eb297c11
@@ -212,7 +212,7 @@ In this mode, `$location` uses Hashbang URLs in all browsers.
|
|||||||
it('should show example', inject(
|
it('should show example', inject(
|
||||||
function($locationProvider) {
|
function($locationProvider) {
|
||||||
$locationProvider.html5Mode(false);
|
$locationProvider.html5Mode(false);
|
||||||
$locationProvider.hashPrefix = '!';
|
$locationProvider.hashPrefix('!');
|
||||||
},
|
},
|
||||||
function($location) {
|
function($location) {
|
||||||
// open http://host.com/base/index.html#!/a
|
// open http://host.com/base/index.html#!/a
|
||||||
@@ -261,7 +261,7 @@ having to worry about whether the browser displaying your app supports the histo
|
|||||||
it('should show example', inject(
|
it('should show example', inject(
|
||||||
function($locationProvider) {
|
function($locationProvider) {
|
||||||
$locationProvider.html5Mode(true);
|
$locationProvider.html5Mode(true);
|
||||||
$locationProvider.hashPrefix = '!';
|
$locationProvider.hashPrefix('!');
|
||||||
},
|
},
|
||||||
function($location) {
|
function($location) {
|
||||||
// in browser with HTML5 history support:
|
// in browser with HTML5 history support:
|
||||||
|
|||||||
Reference in New Issue
Block a user