Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 3a624a7

Browse files
fredsaIgorMinar
authored andcommitted
docs(guide/location): fix table formatting
Fix table formatting so headings are bold, rows are separated by lines, and rows have :hover style
1 parent b32adb7 commit 3a624a7

File tree

1 file changed

+71
-67
lines changed

1 file changed

+71
-67
lines changed

docs/content/guide/dev_guide.services.$location.ngdoc

+71-67
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ changes to $location are reflected into the browser address bar.
2323

2424
## Comparing $location to window.location
2525

26-
<table>
26+
<table class="table">
2727
<thead>
2828

2929
<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>
3333
</tr>
3434

3535
</thead>
@@ -165,13 +165,13 @@ facilitate the browser URL change and history management.
165165

166166
<img src="img/guide/hashbang_vs_regular_url.jpg">
167167

168-
<table>
168+
<table class="table">
169169
<thead>
170170

171171
<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>
175175
</tr>
176176

177177
</thead>
@@ -543,69 +543,73 @@ then uses the information it obtains to compose hashbang URLs (such as
543543

544544
## Changes to your code
545545

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
554557
/>$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
600603
/>$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
602605
/>$location.path() + $location.search()</td>
603-
</tr>
606+
</tr>
604607

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>
609613
</table>
610614

611615
## Two-way binding to $location

0 commit comments

Comments
 (0)