your programing

UI 라우터에서 등록된 상태를 열거하는 방법

lovepro 2023. 3. 13. 23:26
반응형

UI 라우터에서 등록된 상태를 열거하는 방법

ui-router를 사용할 때 등록된 모든 상태를 나열할 수 있는 방법이 있는지 알고 싶습니다.

다음의 문서를 참조해 주세요.$state.get()최신 버전의 ui-module의 경우 함수에 인수를 전달하지 않으면 설정된 모든 상태 객체의 배열을 반환해야 합니다.

/**
 * @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.
 */

언급URL : https://stackoverflow.com/questions/21324303/how-to-enumerate-registered-states-in-ui-router

반응형