Skip to content

ui-sref should use $set instead of raw access to set href #1171

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
nikaspran opened this issue Jun 30, 2014 · 1 comment · Fixed by #1300
Closed

ui-sref should use $set instead of raw access to set href #1171

nikaspran opened this issue Jun 30, 2014 · 1 comment · Fixed by #1300
Labels
Milestone

Comments

@nikaspran
Copy link
Contributor

This is the line in question:

element[0][attr] = newHref;

Should be rewritten to use $set:

attrs.$set(attr, newHref);

This allows other directives to see the new href value and possibly manipulate it (the current approach means it happens outside of angular and it has no idea anything changed).

@nateabele
Copy link
Contributor

Sounds good to me. Feel free to submit a PR if you would like this to happen in the near future.

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

Successfully merging a pull request may close this issue.

3 participants