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