diff --git a/index.html b/index.html index 76a17b5..d0af1a3 100644 --- a/index.html +++ b/index.html @@ -77,6 +77,7 @@
Route Matching Magic. It matches your routes ... magically!
+Clicking "Make Active" will reload the page. Pay attention to the routes.
+It would be nice if your app knew what the address path was and acted accordingly, right? Right.
+$uiRoute.
+ <a ui-route="/page" ng-class="{active: $uiRoute}">link</a>ui-route as an attribute with value supports the following:
+ <a ui-route="/page"><a ui-route="/page/[0-9]*"><a ui-route="/page/{{ sample }}"><a ui-route="/page/{{ sample }}/[0-9]*">ui-route with ng-href attribute:
+ <a ui-route ng-href="/page"><a ui-route ng-href="/page/{{ sample }}">ui-route with href attribute:
+ <a ui-route ng-href="/page">+<ul> + <li ui-route="#/route-1">Route 1 + <strong ui-if="$uiRoute">IS</strong> + <strong ui-if="!$uiRoute">is NOT</strong> active. + </li> + <li ui-route="#/route-2">Route 2 + <strong ui-if="$uiRoute">IS</strong> + <strong ui-if="!$uiRoute">is NOT</strong> active. + </li> + <li ui-route="#/route-3">Route 3 + <strong ui-if="$uiRoute">IS</strong> + <strong ui-if="!$uiRoute">is NOT</strong> active. + </li> +</ul> ++