0
My App.Vue
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
name: 'app',
data () {
return {
}
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
My Home.Vue Component
<template>
<div>
<h1>Home</h1>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
My main.js
import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-route';
import Home from './components/home/Home.vue';
Vue.use(VueRouter);
var router = new VueRouter({
routes: [
{ path: '/', component: Home },
]
})
new Vue({
el: '#app',
router,
render: h => h(App)
})
I’m having this mistake, I’m using the Vue-route
Typeerror: Vue.Directive is not a Function
Vlw, I just realized that besides being spelled wrong I gave a
npm install
also with the wrong name.– William