The Vue.js 2 Master Class
🚧 NOTICE: You are watching a Vue.js 2 lesson

In Component Navigation Guards

Route protection is essential in any application that allows users to authenticate and in this lesson, we're learning how to protect Vue components with navigation guards. A navigation guard acts as a middleware that can protect a route component.

We're also learning how to access data from child components through component refs and how to prevent navigation if a user has made changes to a form.

Click here for the exercise solution.