I created vue js applications with visual studio 2017 . but the problem is when i run the applications , i got following errors in google chrome console windows .
[Vue warn]: Cannot find element: #intro [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
Here is the code for App.vue...
<template>
<div id="app">
<Home msg="Hello world!" />
</div>
</template>
<script>
import Home from './components/Home.vue';
import component1 from './components/component1.vue';
export default {
name: 'app',
components: {
Home,
component1
}
};
</script>
<style>
</style>
Here is the code for component1.vue..
<template>
<div class="intro" style="text-align:center;">
<h1>{{ message }}</h1>
</div>
</template>
<script type="text/javascript">
import Vue from 'vue';
new Vue({
el: '#intro',
data: {
message: 'My first VueJS Task'
}
});
</script>
<style scoped>
</style>
Here is the screen shot of the google console windows ..
class="intro"
, tryid="intro"
– Chris G