-
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
fix($state): populate default toParams in .transitionTo. closes #1396 #1424
fix($state): populate default toParams in .transitionTo. closes #1396 #1424
Conversation
@nateabele please review with comments from #1396 |
The fix is in the right spot, but you can't do a straight I'm still trying to decide if it'd be overkill to make a class to wrap a collection of parameters... thoughts? |
Incidentally, this may actually fix a long-standing issue with |
Oh, right, I see. I have a short laundry list of things to fix regarding typed/default parameters. I think creating a Params class makes sense, since there seem to be quite a few different ways to declare them. Here's my laundry list:
I'm in process of (4).
|
Yeah, currently there's no syntax for making them typed. I guess
Yeah, it requires
You mean https://github.com/angular-ui/ui-router/blob/master/src/state.js#L54?
The current codebase has issues with user-specified capture groups (part of why I rewrote it), so it currently bails on them.
I have a feeling this is negated in the rewrite.
Make it a class, and make it prototypally inherited like |
How about
I was wondering if
You essentially want a StateParams class? I've got a |
Fine either way. I was thinking just the colon would be okay since path parameters have to be wrapped in braces anyway but query parameters don't.
Well, something will have to get recomputed at some point if we're doing an editable state tree. Maybe we can just juggle parent objects. Anyway, I think queuing state definitions until after the type queue has been flushed is the way to go.
Right. If we have one class that takes the config hash of parameters, configure the parameter objectsand self-assign them as properties, then make the parent state's instance the prototype, parameter inheritance is solved. Make sense? |
No description provided.