-
Notifications
You must be signed in to change notification settings - Fork 3k
fix: changes to ui-sref in curly braces does not update $state.href #1449
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
Conversation
… didn't update $state.href for instance: if we had something like: <a ui-sref="test && test.go($stateParams)">Yiahoh</a> and that the test.go() call changed from "parent.tip({test : "test2"})" to "parent.tip({test: 'test3'})" it didn't worked.
Also.. maybe it breaks something. gonna try to find the test suite. Also maybe it was on purpose.. not sure :) I'm doing some tricky things. |
I tried writing some test.. but
it threw this :
really can't help that much. though my changes do passes the current build test ✌️ |
The current behavior is by design. We're considering more dynamic alternatives through separate directives. |
@nateabele Glad to help in anyway, if you could point me in the right direction for this. Meanwhile I'll use my fork even though I don't like to do that :) |
@nateabele Maybe I could write an another directive called ui-string-sref. But I still don't see what should be the alternatives? and why it should be done through an other directive? the ui-sref is already string based (meaning you extract via parseStateRef the state and the params.. I'm just using some curly braces making it dynamic and it does not brake things :) What could I do better? |
@guilbep See the discussion on #395, specifically, this comment. |
for instance:
if we had something like:
<a ui-sref="test && test.go($stateParams)">Yiahoh</a>
and that the test.go() call changed from "parent.tip({test : "test2"})" to "parent.tip({test: 'test3'})" it didn't update the var params in the directive.