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
beforeRouteLeaveguards in deactivated components.Call global
beforeEachguards.Call
beforeRouteUpdateguards in reused components.Call
beforeEnterin route configs.Resolve async route components.
Call
beforeRouteEnterin activated components.Call global
beforeResolveguards.Navigation is confirmed.
Call global
afterEachhooks.DOM updates triggered.
Call callbacks passed to
nextinbeforeRouteEnterguards with instantiated instances.
번역
탐색 실행
발견된 컴포넌트의
beforeRouteLeave가드 실행전역
beforeEach가드 실행재사용 컴포넌트인 경우 해당 컴포넌트의
beforeRouteUpdate가드 실행라우터 설정의
beforeEnter가드 실행비동기 컴포넌트 라우팅 처리
활성화된 컴포넌트의
beforeRouteEnter가드 실행전역
berforeResolve가드 실행안내 완료
전역
afterEach훅 실행DOM 업데이트 실행
전역
DOM updates triggered
beforeRouteEnter가드에서next()로 전달된 콜백 실행
Last updated