Skip to content

ui-sref should inherit params like mgo-ui-router-goto #260

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
eahutchins opened this issue Jul 15, 2013 · 6 comments
Closed

ui-sref should inherit params like mgo-ui-router-goto #260

eahutchins opened this issue Jul 15, 2013 · 6 comments

Comments

@eahutchins
Copy link

I've started using the ui-sref directive (switching from mgo-ui-router-goto) and one of the nice features was inheritance of parameters from parent states. Spelling all the parameters out each time is an error-prone pain for complex navigation. edit: it should also be possible to change parameters without changing the state: ui-sref='({ param: newvalue })' might work as syntax for that.

Also a relative state reference would be useful (i.e. if you're in foo and want to get to foo.bar you should be able to do ui-sref='.bar', if you're in foo.bar and want to get to foo.baz use something like ui-sref='..baz', ui-sref='..' to get to the parent, etc). I'm not sure what the right syntax should be for this one though.

@timkindberg
Copy link
Contributor

Pretty sure we've thrown all these ideas around already (not making a stab at you, because they are very good ideas, and would be really helpful). I think its just a matter of finding the time to implement them. @nateabele were you working on any of these?

@eahutchins please feel free to submit a pull request for any of those features, we are short on helpers.

@eahutchins
Copy link
Author

I'm working on an implementation and I'd be happy to contribute, is there any consensus on what relative-state addressing should look like? searching ui-sref or uiSref doesn't find any issues (any links to the discussions would be appreciated).

@nateabele
Copy link
Contributor

This is already in progress. See #15.

@nateabele
Copy link
Contributor

@ksperling Yeah, I'll try and finish up my implementation by Wednesday.

@timkindberg
Copy link
Contributor

@nateabele is yours going to do this?

" if you're in foo and want to get to foo.bar you should be able to do ui-sref='.bar'."

@nateabele
Copy link
Contributor

Not that syntax, but yes.

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

3 participants