Closed vidhill closed 6 years ago
I think I could define the additional states in a Behavior,
It appears that I should be able to get access to the router using UIRouterBehavior
but I'm not quite sure how to bring it all together..
I would use behavior for that, since you need to update global state somewhere before your elements are getting added in many scenarios.
Closing, feel free to reopen if you need help.
Hello again,
I'm playing around with the router, verifying it will work for all my use cases
I created a little repo to show what I'm trying to do.. https://github.com/vidhill/polymer-ui-router-poc And a live githube pages version here: https://vidhill.github.io/polymer-ui-router-poc/build/default/index.html
I am using a subroute..
What I was hoping to be able to do was register the states for the subroutes somewhere besides the root application...
I have it working, to a degree, I have subroutes under #/dogs/
However, on first load, if I go to #/dogs/terrier it redirects back to the default (
cats_route
) state defined usingotherwise
-because, as at that point the states that reside under dogs.html haven't been registered yet..
Is there a better way to do what I am trying to achieve? Or would I be better to go with the approach of managing all states from one location?
Many Thanks.