Guard
Vue Router Navigation Guard
Navigation Guard?
Navigation Flow
원문
번역
Last updated
이 문서에서는 Vue Router에서 제공하는 가드 기능을 사용하는 방법에 대해서 다룬다.
Navigation Guard 는 Vue Router 에서 라우팅을 처리할 때 간섭을 통해 차단 또는 추가 작업을 수행할 수 있는 기능이다. 다음과 같은 종류가 있다.
Global before each guard
Global resolve guard
Global after each guard
Pre route guard
In component guard
Navigation triggered.
Call beforeRouteLeave guards in deactivated components.
Call global beforeEach guards.
Call beforeRouteUpdate guards in reused components.
Call beforeEnter in route configs.
Resolve async route components.
Call beforeRouteEnter in activated components.
Call global beforeResolve guards.
Navigation is confirmed.
Call global afterEach hooks.
DOM updates triggered.
Call callbacks passed to next in beforeRouteEnter guards with instantiated instances.
탐색 실행
발견된 컴포넌트의 beforeRouteLeave 가드 실행
전역 beforeEach 가드 실행
재사용 컴포넌트인 경우 해당 컴포넌트의 beforeRouteUpdate 가드 실행
라우터 설정의 beforeEnter 가드 실행
비동기 컴포넌트 라우팅 처리
활성화된 컴포넌트의 beforeRouteEnter 가드 실행
전역 berforeResolve 가드 실행
안내 완료
전역 afterEach 훅 실행
DOM 업데이트 실행
전역
DOM updates triggered
beforeRouteEnter 가드에서 next()로 전달된 콜백 실행
Last updated