Skip to content

Commit 2e9c333

Browse files
committed
Update README.md
1 parent 6f77496 commit 2e9c333

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,18 @@ Section 1 contents.
127127
128128
...etc. You can reach any nesting level here. Every view will be handled independently, keeping the state of top-level views.
129129
130+
You can also use filters to define link hrefs. It will resolve segment URLs automatically:
131+
```html
132+
<ul>
133+
<li ng-class="{active: ('s1' | routeSegmentStartsWith)}">
134+
<a href="{{ 's1' | routeSegmentUrl }}">Section 1</a>
135+
</li>
136+
<li ng-class="{active: ('s2' | routeSegmentStartsWith)}">
137+
<a href="{{ 's2' | routeSegmentUrl }}">Section 2</a>
138+
</li>
139+
</ul>
140+
```
141+
130142
Difference from UI-Router
131143
-------------------------
132144

0 commit comments

Comments
 (0)