I am trying to route using vue cdn and vue router cdn. It is supposed to display Dashboard in first. And when I press Add Employee then its shows Unexpected token < at first line.
index.html
<router-link to="/">Home</router-link>
<router-link to="/employee">Add Employee</router-link>
<router-link to="/contact">Contact</router-link>
<router-link to="/client">Add Client</router-link>
index.js
Vue.component('addEmp',{
template:require('./components/addEmp.html')
})
var client = {template:"<h1>Client</h1>"};
var addEmp = {template:"<addEmp></addEmp>"};
var contacts = {template:"<h1>Contacts</h1>"};
var dashboard = {template:"<h1>Dashboard</h1>"};
var routes = [
{path:'/', component: dashboard},
{path:'/employee',component:addEmp}
];
var router = new VueRouter({
routes:routes
});
var routerR = new Vue({
router,
el:'#app',
components:{
addEmp
},
data:{
},
methods:{
}
}).$mount("#app")
addEmp.vue
<div id="addEmp">
<h1>saijal</h1>
</div>
<script>
module.export=`<h1>Hi</h1>`;
</script>