Include common header and footer using Vuejs – router-view
In this Post We Will Explain About is Include common header and footer using Vuejs – router-view With Example and Demo.Welcome on infinityknow.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to How to include header and footer using VueJsExample
In this post we will show you Best way to implement Best way to handle a semi-common header, footer, and side menu using VueJs, hear for Creating a Header and Footer to be Used on all Pages in VueJswith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.
how to automatically include your header, navigation, and footer on every page using Vuejs Example
index.html
[php]
[/php]
index.js
[php]
Vue.use(VueRouter)
var App = Vue.extend({})
var User1 = Vue.extend({
name: ‘User1’,
data() { return { name: ‘User1’}},
template: ‘
Component 1
This is Component 1 : Devloped By : infinityknow.com
‘
})
var User2 = Vue.extend({
name: ‘User2’,
data() { return { name: ‘User2’}},
template: ‘
Component 2
This is Component 2 : Devloped By : infinityknow.com
‘
})
var router = new VueRouter({})
router.map({
‘/user1’: { component: User1 },
‘/user2’: { component: User2 }
})
router.alias({
‘/’: ‘/user1’
})
router.start(App, ‘#liveapp’)
[/php]
styel.css
[php]
header {
border-bottom: 2px solid black;
margin-bottom: 15px;
}
footer {
border-top: 2px solid black;
margin-top: 15px;
}
[/php]
I hope you have Got What is how to automatically include your header, navigation, and footer on every page using Vuejs And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.