Open hjylewis opened 8 years ago
@hjylewis - After merging your pull request and reviewing this issue on the plunkr link you provided, it looks like this is no longer an issue. Would you please confirm whether or not this is still an open issue so that I can adjust the ticket accordingly? Thank you.
@oldtimeguitarguy The issue is still present in the plunkr link for me. Strange.. Did you make sure to change the lines commented with // Change to 'redirect' middleware
?
My pull request added functionality unrelated to this issue.
This one is pretty tricky. I worked on it a bit tonight and didn't really get anywhere.
One might want to set up a state to redirect to a sub-state using middleware. Say,
/docs
always redirects to/docs/getting-started
.When a simple
this.redirectTo('parent.child')
middleware is written and called when routing to theparent
state, it results in an infinite loop.Example: (caution: crashes page) https://plnkr.co/edit/syZdLJQ2I8ZomP7T9ndA?p=preview
In this example, there are state
one
with sub-states,one.one
andone.two
and statetwo
. Presently, the only middleware used is one that simply callsthis.next()
.If one changes the middleware at the two lines commented with
// Change to 'redirect' middleware
to theredirect
middleware, one expects that clicking theone
andtwo
links redirect to sub-stateone.one
. Thetwo
link performs as expected, but clicking theone
link causes an infinite loop.