mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix(docs.guide): fix $location example
This commit is contained in:
parent
260725efcd
commit
5e663c3dc7
2 changed files with 14 additions and 21 deletions
|
|
@ -369,8 +369,10 @@ redirect to regular / hashbang url, as this conversion happens only during parsi
|
|||
|
||||
In this examples we use `<base href="/base/index.html" />`
|
||||
|
||||
<ul class="doc-example">
|
||||
<li ng:non-bindable class="html5-hashbang-example">
|
||||
<doc:example>
|
||||
<doc:source source="false">
|
||||
|
||||
<div ng:non-bindable class="html5-hashbang-example">
|
||||
<div id="html5-mode" ng:controller="Html5Cntl">
|
||||
<h3>Browser with History API</h3>
|
||||
<ng:address-bar browser="html5"></ng:address-bar><br /><br />
|
||||
|
|
@ -380,9 +382,9 @@ In this examples we use `<base href="/base/index.html" />`
|
|||
$location.path() = {{$location.path()}}<br />
|
||||
$location.search() = {{$location.search()}}<br />
|
||||
$location.hash() = {{$location.hash()}}<br />
|
||||
<a href="/base/first?a=b">/base/first?a=b</a> | <a
|
||||
href="sec/ond?flag#hash">sec/ond?flag#hash</a> | <a href="/base/another?search"
|
||||
ng:ext-link>external</a>
|
||||
<a href="/base/first?a=b">/base/first?a=b</a> |
|
||||
<a href="sec/ond?flag#hash">sec/ond?flag#hash</a> |
|
||||
<a href="/base/another?search" ng:ext-link>external</a>
|
||||
</div>
|
||||
|
||||
<div id="hashbang-mode" ng:controller="HashbangCntl">
|
||||
|
|
@ -394,12 +396,11 @@ ng:ext-link>external</a>
|
|||
$location.path() = {{$location.path()}}<br />
|
||||
$location.search() = {{$location.search()}}<br />
|
||||
$location.hash() = {{$location.hash()}}<br />
|
||||
<a href="/base/first?a=b">/base/first?a=b</a> | <a
|
||||
href="sec/ond?flag#hash">sec/ond?flag#hash</a> | <a href="/base/another?search"
|
||||
ng:ext-link>external</a>
|
||||
<a href="/base/first?a=b">/base/first?a=b</a> |
|
||||
<a href="sec/ond?flag#hash">sec/ond?flag#hash</a> |
|
||||
<a href="/base/another?search" ng:ext-link>external</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function FakeBrowser(initUrl, baseHref) {
|
||||
|
|
@ -481,6 +482,9 @@ ng:ext-link>external</a>
|
|||
initEnv('hashbang');
|
||||
</script>
|
||||
|
||||
</doc:source>
|
||||
</doc:example>
|
||||
|
||||
|
||||
# Caveats
|
||||
|
||||
|
|
|
|||
|
|
@ -467,17 +467,6 @@ td.empty-corner-lt {
|
|||
}
|
||||
|
||||
/* service.$location Html5 mode example */
|
||||
.html5-hashbang-example {
|
||||
height: 255px;
|
||||
margin-left: -40px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.html5-hashbang-example div {
|
||||
float: left;
|
||||
width: 375px;
|
||||
}
|
||||
|
||||
.html5-hashbang-example div input {
|
||||
width: 360px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue