The Vue.js 2 Master Class
🚧 PLEASE NOTE: An updated version of this course is available! see the The Vue.js Master Class 2024 Edition course. This course is outdated!

Global Navigation Guards and Meta Fields

A third alternative to protecting sections of your vue.js applications is to use Global Navigation Guards with meta fields. With this method, we'd register the guards in the Vue routers beforeEach hook and make decisions based on a routes meta fields (e.g. requiresAuth: true).

In this lesson, we'll learn how to set up global navigation guards and get a few ideas on how we can benefit from storing data in the route meta fields.