如果你查看$ state.get()的文档的最新版本的ui-router,你会注意到没有传递参数到函数应该返回一个所有配置的状态对象的数组。
原文链接:https://www.f2er.com/angularjs/145290.html/** * @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. */