re: A simple way to keep your Vue page title in sync with the router VIEW POST

FULL DISCUSSION
 

Navigation guard inside your router makes more sense structurally IMO, but each work well:

router.beforeEach((to, from, next) => {
  document.title = to.meta.title || 'Your Website Title');
  next();
});

;)

code of conduct - report abuse