fix(gen:app:navbar): improve navbar component when using ui-router#445
fix(gen:app:navbar): improve navbar component when using ui-router#445kingcody wants to merge 1 commit intoangular-fullstack:masterfrom
Conversation
Changes:
- Use `ui-sref` instead of `href` or `ng-href` when ui-router is chosen
- Use `ui-sref-active` instead of `ng-class='{active: isActive()}'` when ui-router is chosen
- Use `$scope.menu[n].state` instead of `$scope.menu[n].link` when ui-router is chosen (attempt to remove possible confusion)
- Omit `$scope.isActive` when ui-router is chosen
- Simplify `navbar(jade).jade` templating (remove extra `<% if (filters.auth) %>` tag)
closes angular-fullstack#436
|
@JaKXz potentially the change to use Your thoughts? |
|
I'd be in favour of $state.go(), leveraging UI-router. |
|
Then perhaps we should take a look actually leveraging more of UI-router's features when it come to state routing.
I'm actually using Either way, would a separate PR be inline to cover these possible changes, as well as switching to |
|
As for a logout state, we could also make a corresponding route if the user chooses In either case, if the URL: This would allow for a more restful interface as well as provide additional functionality such as allowing for: Just my 2 cents... |
|
Also, I'd be interested in submitting the PR to cover such a change. Not trying to throw extra work on anyone else ;) |
|
Those are all good points. Go nuts, @kingcody! |
|
Looks good. I need to start merging things into the canary branch. |
|
PRs directly to canary would make my job easier. |
Changes:
ui-srefinstead ofhreforng-hrefwhen ui-router is chosenui-sref-activeinstead ofng-class='{active: isActive()}'when ui-router is chosen$scope.menu[n].stateinstead of$scope.menu[n].linkwhen ui-router is chosen (attempt to remove possible confusion)$scope.isActivewhen ui-router is chosennavbar(jade).jadetemplating (remove extra<% if (filters.auth) %>tag)closes #436, #331