Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 1 | <div class="nav"> |
| 2 | <ul> |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 3 | <li |
| 4 | ng-repeat="route in vm.routes track by $index" |
| 5 | ui-sref-active="active" |
| 6 | ng-class="vm.isRouteActive(route)"> |
| 7 | <a ng-if="route.state" ui-sref="{{route.state}}" ng-click="vm.activateRoute(route)"> |
| 8 | <i ng-if="route.children" class="fa fa-chevron-right"></i> |
| 9 | {{route.label}} |
| 10 | </a> |
| 11 | <a ng-if="route.url" href="#/{{route.url}}" ng-click="vm.activateRoute(route)"> |
| 12 | <i ng-if="route.children" class="fa fa-chevron-right"></i> |
| 13 | {{route.label}} |
| 14 | </a> |
| 15 | <ul class="child-routes" ng-if="route.children" ng-class="{opened: route.opened}"> |
Matteo Scandolo | ee655a1 | 2016-12-19 15:38:43 -0800 | [diff] [blame^] | 16 | <li ng-repeat="childRoute in route.children | orderBy:'label'" ui-sref-active="active"> |
Matteo Scandolo | e0d71ea | 2016-12-19 11:56:12 -0800 | [diff] [blame] | 17 | <a ng-if="childRoute.state" ui-sref="{{childRoute.state}}">{{childRoute.label}}</a> |
| 18 | <a ng-if="childRoute.url" href="#/{{childRoute.url}}">{{childRoute.label}}</a> |
| 19 | </li> |
| 20 | </ul> |
Matteo Scandolo | f6acdbe | 2016-12-13 10:29:37 -0800 | [diff] [blame] | 21 | </li> |
| 22 | </ul> |
| 23 | </div> |