1.0.0 • Published 6 years ago

@wwu-restek/vue-update-title v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

ResTek's Vue Update Title Module

This module exposes a vue-router Navigation Guard that updates the page/tab title dynamically.

Installation

npm i @wwu-restek/vue-update-title

Example:

// in vue router.js
import updateTitle from '@wwu-restek/vue-update-title';

const router = {
  routes: [
    {
      path: '/about',
      component: About,
      meta: { title: 'About' }
    }
  ]
};

const updateTitleConfig = { appTitle: 'Example App' }
router.beforeEach(updateTitle(updateTitleConfig));

export default router;

// This will display the about page with the tab title: `About | Example App`

More Documentation

More complete documentation is available by generating JSDocs for the module.