Complete Vue.js 2 Web Development_ Practical guide to building end-to-end web development solutions with Vue.js 2

(singke) #1
Single Page Applications Chapter 15

alias: '/green-dress-01'
},
{
path: '/red-purse-A2',
component: PradaA2,
alias: '/green-purse-A2'
}
]
})

Here's what the mentioned components look like:


const Valentino01 = { template: '<div class="emoji"> </div>' }
const PradaA2 = { template: '<div class="emoji"> </div>' }

Before launching the app, remember to instantiate a Vue instance:


new Vue({
router,
el: '#app'
})

You can add a CSS rule to make the emojis look like images, as shown in the following
screenshot:


.emoji {
font-size: 3em;
}
Free download pdf