微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

angularjs – 如何枚举ui路由器中注册的状态?

我想知道如果有一个方法来列出所有注册的状态,当使用 ui-router
如果你查看$ state.get()的文档的最新版本的ui-router,你会注意到没有传递参数到函数应该返回一个所有配置的状态对象的数组。
/**
 * @ngdoc function
 * @name ui.router.state.$state#get
 * @methodof ui.router.state.$state
 *
 * @description
 * Returns the state configuration object for any state by passing the name
 * as a string. Without any arguments it'll return a array of all configured
 * state objects.
 *
 * @param {string|object} stateOrName The name of the state for which you'd like 
 * to get the original state configuration object for.
 * @returns {object} State configuration object or array of all objects.
 */

原文地址:https://www.jb51.cc/angularjs/145290.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐