-
Notifications
You must be signed in to change notification settings - Fork 3k
Add $state.getAll()
#411
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
Add $state.getAll()
#411
Conversation
Could this just be the behavior of |
I think it would make more sense for |
I can actually think of a few valid use cases for using this functionality in production (and @stu-salsbury can & has argued for this and other tree-traversal methods at length), and I really don't see a problem with passing |
I've got no strong objection to |
Indeed anything to chip away at the gaps from detour makes me warm and fuzzy... tree traversal, json support... I'm feeling fuzzy now but that could be a coffee OD. That said, I might know from where @eahutchins is coming. Since the states and urlRouter routes aren't internally stored as trees it felt to me as if I was operating in some sort of fragile parallel universe given that I was going to be modifying definitions at runtime.. That conclusion was the moment when I blew away my fork and after testing the waters with getting ui-router onto a tree created detour. That said, if step one is to have the api support tree-style traversal and tree-based storage (and editing) needs to wait (perhaps forever) it still moves in a direction I like. |
I think we could probably move forward with another accessor like |
👍 |
@timkindberg Don't forget to update the docs to reflect |
$state.get()
is insufficient for introspecting the entire state table,getAll()
returns the entire table in one call (useful for debugging lazy-loaded states, for example).