使用ui-router进入祖父母州 [英] Go to grandparent state with ui-router

查看:93
本文介绍了使用ui-router进入祖父母州的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用ui-router,我可以使用$state.go('^')进入父状态,而不必指定其完整路径.是否有类似的方式可以进入祖父母状态(我的父状态是抽象状态)?

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?

推荐答案

您可以使用

$state.go('^.^')

这篇关于使用ui-router进入祖父母州的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆