ui-router icon indicating copy to clipboard operation
ui-router copied to clipboard

Suggestion to have a redirect defined in a state

Open rajivramv opened this issue 11 years ago • 1 comments

I have seen suggestions for redirect using .when() but is it possible to define a redirect url/state in the $stateProvider.state definition itself. In my application, it is semantically appropriate that I navigate to parent state rather than parent.child. Also, if it is handled there then $state.go ('^') from parent.child should go to the grandparent state, if any. I have several such states in my application and I feel it's cleaner to have a feature than use .when ()

ps. Apologies for the spam

rajivramv avatar Apr 22 '15 02:04 rajivramv

This is being discussed in #1584 and #27. Please direct your comments there. Thanks.

nateabele avatar Apr 23 '15 14:04 nateabele