Mat*_*Way 44
如果您查看$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.
*/
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10146 次 |
| 最近记录: |