Skip to content

Instantly share code, notes, and snippets.

@Serhansolo
Created March 30, 2020 21:35
Show Gist options
  • Save Serhansolo/05437bfff190d81e4e4ad7b395890498 to your computer and use it in GitHub Desktop.
Save Serhansolo/05437bfff190d81e4e4ad7b395890498 to your computer and use it in GitHub Desktop.
import Vue from "vue";
import VueRouter from "vue-router";
import Login from "@/components/Login";
import Register from "@/components/Register";
Vue.use(VueRouter);
const routes = [
{
path: "/login",
name: "Login",
component: Login,
alias: "/"
},
{
path: "/register",
name: "Register",
component: Register
}
];
const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL,
routes
});
export default router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment