<template>
<h1>popalihwey {{ title }} {{ number }}</h1>
</template>
<script>
export default {
data() {
return {
title:'Hafiz',
number : '0166759887'
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
On App.vue must import to use
<template>
<div id="app">
<img src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
<Wadup></Wadup> </div>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
import Wadup from './components/Wadup.vue'
export default {
name: 'app',
components: {
HelloWorld, Wadup }
}
</script>
<style>
</style>
Must add this script to start use component in any pages
<script>
import HelloWorld from '@/components/HelloWorld.vue'
import Wadup from '@/components/Wadup.vue'
export default {
name: 'home',
components: {
HelloWorld,
Wadup,
}
}
</script>
Already declare? start calling it by using <HelloWorld/> and <Wadup/>