Skip to content

ui-route has own acctive and reference ways #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gintsgints opened this issue Aug 11, 2014 · 2 comments
Closed

ui-route has own acctive and reference ways #436

gintsgints opened this issue Aug 11, 2014 · 2 comments

Comments

@gintsgints
Copy link
Contributor

When ui-route is selected as router, then menu links should be changed from:

ng-class='{active: isActive("/logout")}'

to

ui-sref-active='active'

and function isActive imho can be removed,
and

href='/signup'

should be changed to

ui-sref='signup'
@kingcody
Copy link
Member

+1

@JaKXz JaKXz added the bug label Aug 13, 2014
@JaKXz
Copy link
Collaborator

JaKXz commented Aug 13, 2014

Closing as a duplicate of #331

@JaKXz JaKXz closed this as completed Aug 13, 2014
kingcody added a commit to kingcody/generator-angular-fullstack that referenced this issue Aug 13, 2014
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants