Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

The Vue.js Master Class

Global Navigation Guards and Meta Fields

🚧 PLEASE NOTE: This masterclass is built with the Options API

The Composition API Masterclass is coming soon!

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.