---
# System prepended metadata

title: vue-router
tags: [Vue note]

---

---
title: vue-router
tags: Vue note
---
        npm i vue-router

## Setting vue-router example 

> main.js

![](https://i.imgur.com/wu5gYQd.png =500x)



> App.vue

![](https://i.imgur.com/YVCiB8S.png =400x)

> components/AppHeader.vue

![](https://i.imgur.com/EhDLvz0.png =500x)


## Redirect to another url

> 

> main.js

![](https://i.imgur.com/PAX56gu.png =500x)

> store/modules/auth.js

![](https://i.imgur.com/0sWCqlU.png =400x)
