12

With ui-router I can use $state.go('^') to go to parent state without having to specify it's full path. Is there similar way to go to grandparent state (my parent state is abstract)?

In documentation examples I can see only ^ for parent, but maybe someone has good solution for this?

0

1 Answer 1

17

You can transition to the grandparent state with

$state.go('^.^')
2
  • Ah, I tried ^^ and even .go('^').go('^'). I was pretty sure I tried also the one you wrote but probably I gave up, thinking it won't work... Tomorrow I'll check if it works and accept the answer. Thanks!
    – Episodex
    Commented Nov 4, 2014 at 18:47
  • 16
    That looks like a happy little bear face
    – Chris T
    Commented Nov 4, 2014 at 21:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.