-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make ui-sref accept objects and not only Strings #900
Comments
You mean the params right? Yeah I'm thinking we should split ui-sref into two directives (like we already did for the new ui-sref-options directive), ui-sref for the state name and ui-sref-params for the params object. It would be a breaking change but probably worth it. |
Sorry for not being clear. Yeah, I meant the params. You can look at my code, it's actually really simple to implement the It'd be a breaking change but totally worth it. It makes sense that params aren't "hardcoded string" and actual scope objects IMHO. Thanks! |
@nateabele I'm fine with this breaking change. Are you? @mgonto if nate is fine with it, would you want to submit a pull request (with tests, etc)? |
@nateabele hey nice to talk to you again :). I'll check and if it's short I'll do the PR now :). I'm going on vacations next week so I'll see if it can be done quickly. Thanks! |
Ok that's fine. Cool. |
Fixed in 3831af1 |
- Refactor StateRefDirective for better modularity - Drop key restrictions on ui-sref-opts - Improves performance over prior implementation with no extra $eval()’s Fixes angular-ui#395, angular-ui#900, angular-ui#1932
Hey,
Sometimes we actually want to link to another state based on a value on scope and not only by text.
I think it might be a good idea to make ui-sref accept values and call
$eval
on it. I created my own directive for this. You may want to use something similar. I can PR this as well to your code if you guys want.https://github.com/mgonto/mgo-ui-router-goto/blob/master/uiGoto.js
Thanks!
The text was updated successfully, but these errors were encountered: