Answer the question
In order to leave comments, you need to log in
Vue-JS: how to change views based on user type?
There is a page. It has a panel on it. It is necessary for each type of user: guest, logged in, admin to show different links on it. I can't figure out if I think it's right that I'm trying to do this:
var userMenu = Vue.component("usermenu", Vue.extend({
template: "#usermenu",
components: {
guestView: Vue.extend({
template: `
<p>Quest</p>
`}),
userView: Vue.extend({
template: `
<p>User</p>
`}),
adminView: Vue.extend({
template: `
<p>Admin</p>
`})
}
Vue.component('usermenu', userMenu)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question