Skip to content
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

Empty links by ng2 uiSref directive #3248

Closed
artaommahe opened this issue Jan 8, 2017 · 2 comments
Closed

Empty links by ng2 uiSref directive #3248

artaommahe opened this issue Jan 8, 2017 · 2 comments

Comments

@artaommahe
Copy link

artaommahe commented Jan 8, 2017

uiSref directives binds 'null' string to href on provided null or empty string '' state.

current behavior

<!-- template -->
<a [uiSref]="null">smth</a>
<a [uiSref]="''">smth</a>

<!-- result -->
<a href="null">smth</a>

expected no href attribute (null property value?)

<!-- result -->
<a>smth</a>

It's required for dynamic links when for some cases href should be empty and link clicks does not trigger any state changes (access rights check e.x.)

@artaommahe
Copy link
Author

Fixed expected result html, due to empty href forced to reload page

@christopherthielen
Copy link
Contributor

This issue was moved to ui-router/angular#26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants