@@ -23,13 +23,13 @@ changes to $location are reflected into the browser address bar.
23
23
24
24
## Comparing $location to window.location
25
25
26
- <table>
26
+ <table class="table" >
27
27
<thead>
28
28
29
29
<tr>
30
- <td class="empty-corner-lt"></td >
31
- <td >window.location</td >
32
- <td >$location service</td >
30
+ <th class="empty-corner-lt"></th >
31
+ <th >window.location</th >
32
+ <th >$location service</th >
33
33
</tr>
34
34
35
35
</thead>
@@ -165,13 +165,13 @@ facilitate the browser URL change and history management.
165
165
166
166
<img src="img/guide/hashbang_vs_regular_url.jpg">
167
167
168
- <table>
168
+ <table class="table" >
169
169
<thead>
170
170
171
171
<tr>
172
- <td class="empty-corner-lt"></td >
173
- <td >Hashbang mode</td >
174
- <td >HTML5 mode</td >
172
+ <th class="empty-corner-lt"></th >
173
+ <th >Hashbang mode</th >
174
+ <th >HTML5 mode</th >
175
175
</tr>
176
176
177
177
</thead>
@@ -543,69 +543,73 @@ then uses the information it obtains to compose hashbang URLs (such as
543
543
544
544
## Changes to your code
545
545
546
- <table>
547
- <tr class="head">
548
- <td>Navigation inside the app</td>
549
- <td>Change to</td>
550
- </tr>
551
-
552
- <tr>
553
- <td>$location.href = value<br />$location.hash = value<br />$location.update(value)<br
546
+ <table class="table">
547
+ <thead>
548
+ <tr class="head">
549
+ <th>Navigation inside the app</th>
550
+ <th>Change to</th>
551
+ </tr>
552
+ </thead>
553
+
554
+ <tbody>
555
+ <tr>
556
+ <td>$location.href = value<br />$location.hash = value<br />$location.update(value)<br
554
557
/>$location.updateHash(value)</td>
555
- <td>$location.path(path).search(search)</td>
556
- </tr>
557
-
558
- <tr>
559
- <td>$location.hashPath = path</td>
560
- <td>$location.path(path)</td>
561
- </tr>
562
-
563
- <tr>
564
- <td>$location.hashSearch = search</td>
565
- <td>$location.search(search)</td>
566
- </tr>
567
-
568
- <tr class="head">
569
- <td>Navigation outside the app</td>
570
- <td>Use lower level API</td>
571
- </tr>
572
-
573
- <tr>
574
- <td>$location.href = value<br />$location.update(value)</td>
575
- <td>$window.location.href = value</td>
576
- </tr>
577
-
578
- <tr>
579
- <td>$location[protocol | host | port | path | search]</td>
580
- <td>$window.location[protocol | host | port | path | search]</td>
581
- </tr>
582
-
583
- <tr class="head">
584
- <td>Read access</td>
585
- <td>Change to</td>
586
- </tr>
587
-
588
- <tr>
589
- <td>$location.hashPath</td>
590
- <td>$location.path()</td>
591
- </tr>
592
-
593
- <tr>
594
- <td>$location.hashSearch</td>
595
- <td>$location.search()</td>
596
- </tr>
597
-
598
- <tr>
599
- <td>$location.href<br />$location.protocol<br />$location.host<br />$location.port<br
558
+ <td>$location.path(path).search(search)</td>
559
+ </tr>
560
+
561
+ <tr>
562
+ <td>$location.hashPath = path</td>
563
+ <td>$location.path(path)</td>
564
+ </tr>
565
+
566
+ <tr>
567
+ <td>$location.hashSearch = search</td>
568
+ <td>$location.search(search)</td>
569
+ </tr>
570
+
571
+ <tr class="head">
572
+ <td>Navigation outside the app</td>
573
+ <td>Use lower level API</td>
574
+ </tr>
575
+
576
+ <tr>
577
+ <td>$location.href = value<br />$location.update(value)</td>
578
+ <td>$window.location.href = value</td>
579
+ </tr>
580
+
581
+ <tr>
582
+ <td>$location[protocol | host | port | path | search]</td>
583
+ <td>$window.location[protocol | host | port | path | search]</td>
584
+ </tr>
585
+
586
+ <tr class="head">
587
+ <td>Read access</td>
588
+ <td>Change to</td>
589
+ </tr>
590
+
591
+ <tr>
592
+ <td>$location.hashPath</td>
593
+ <td>$location.path()</td>
594
+ </tr>
595
+
596
+ <tr>
597
+ <td>$location.hashSearch</td>
598
+ <td>$location.search()</td>
599
+ </tr>
600
+
601
+ <tr>
602
+ <td>$location.href<br />$location.protocol<br />$location.host<br />$location.port<br
600
603
/>$location.hash</td>
601
- <td>$location.absUrl()<br />$location.protocol()<br />$location.host()<br />$location.port()<br
604
+ <td>$location.absUrl()<br />$location.protocol()<br />$location.host()<br />$location.port()<br
602
605
/>$location.path() + $location.search()</td>
603
- </tr>
606
+ </tr>
604
607
605
- <tr>
606
- <td>$location.path<br />$location.search</td>
607
- <td>$window.location.path<br />$window.location.search</td>
608
- </tr>
608
+ <tr>
609
+ <td>$location.path<br />$location.search</td>
610
+ <td>$window.location.path<br />$window.location.search</td>
611
+ </tr>
612
+ </tbody>
609
613
</table>
610
614
611
615
## Two-way binding to $location
0 commit comments