Is there any way to use one component page in vue.js while restricting the other components?Creating a child component within a parent component in Vue.JSHow to structure components in a large vue.js app?vue js two SPAsHow to make Vue.js + Vuetify.js page elements to display only with CSS ready?Can't register component locally in Vue.js. “[Vue warn]: Unknown custom element”Vue.js and structuring multi-page web apps - component registrationsLARAVEL + Vue.js: using blade to show whole page vue.js components in MPA, not SEO friendlyCannot embed vue components that have md-app-toolbar and md-app-drawer in md-appVuetify - Hide Navigation drawer during transitionVue.js transition of components due to rerouting
The instant an accelerating object has zero speed, is it speeding up, slowing down, or neither?
What is this plant I saw for sale at a Romanian farmer's market?
Using roof rails to set up hammock
Should I email my professor to clear up a (possibly very irrelevant) awkward misunderstanding?
How can the US president give an order to a civilian?
Do Battery Electrons Only Move If There is a Positive Terminal at the End of the Wire?
How did Frodo know where the Bree village was?
Digital signature that is only verifiable by one specific person
How to write a nice frame challenge?
What is the precise meaning of "подсел на мак"?
Are there any individual aliens that have gained superpowers in the Marvel universe?
How do credit card companies know what type of business I'm paying for?
Credit card validation in C
Right indicator flash-frequency has increased and rear-right bulb is out
Fibonacci sequence and other metallic sequences emerged in the form of fractions
Common Marsupials and Rare Antelopes
How is linear momentum conserved in circular motion?
How useful is the GRE Exam?
How to avoid offending original culture when making conculture inspired from original
Co-worker is now managing my team. Does this mean that I'm being demoted?
...and then she held the gun
Object-oriented design implementation of an Elevator
How to recover a single blank shot from a film camera
Graphing large functions in LaTeX
Is there any way to use one component page in vue.js while restricting the other components?
Creating a child component within a parent component in Vue.JSHow to structure components in a large vue.js app?vue js two SPAsHow to make Vue.js + Vuetify.js page elements to display only with CSS ready?Can't register component locally in Vue.js. “[Vue warn]: Unknown custom element”Vue.js and structuring multi-page web apps - component registrationsLARAVEL + Vue.js: using blade to show whole page vue.js components in MPA, not SEO friendlyCannot embed vue components that have md-app-toolbar and md-app-drawer in md-appVuetify - Hide Navigation drawer during transitionVue.js transition of components due to rerouting
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am building the web-app, which includes the authentication page like login.vue and register.vue components, also I'm using the drawer.vue page as the core component, i.e I'm using the drawer.vue component in the whole project or in all other components.
The problem here is that I do not want to use drawer.vue component in login.vue and register.vue components.
I have tried this to restrict the register.vue component by doing "v-if="$route.name !== 'register'" in the app.vue file.i.e.
<template>
<v-app>
<core-toolbar v-if="$route.name !== 'register'" />
<core-drawer v-if="$route.name !== 'register'" />
<core-view />
</v-app>
</template>
The problem here is that I am unable to restrict the login.vue component, I'm only be able to restrict the register component, does any one have better solution for this?
vue.js
add a comment |
I am building the web-app, which includes the authentication page like login.vue and register.vue components, also I'm using the drawer.vue page as the core component, i.e I'm using the drawer.vue component in the whole project or in all other components.
The problem here is that I do not want to use drawer.vue component in login.vue and register.vue components.
I have tried this to restrict the register.vue component by doing "v-if="$route.name !== 'register'" in the app.vue file.i.e.
<template>
<v-app>
<core-toolbar v-if="$route.name !== 'register'" />
<core-drawer v-if="$route.name !== 'register'" />
<core-view />
</v-app>
</template>
The problem here is that I am unable to restrict the login.vue component, I'm only be able to restrict the register component, does any one have better solution for this?
vue.js
When app loads, by default loadcore-drawer&core-toolbarwith false and when userloginorregisterinto the app, store the user value in localstorage and make the flagtrue. Hope this works!
– varit05
Mar 25 at 4:53
Is there a route to the login component? If so, why are you not adding it to thev-ifcondition? You can use this syntax:['register', 'login'].includes($route.name)
– Rashad Saleh
Mar 25 at 11:20
ya, there is route for login and register both, sorry but i didnt get you, can you please elaborate, about what you are saying @RashadSaleh
– Robin Prajapati
Mar 25 at 15:44
add a comment |
I am building the web-app, which includes the authentication page like login.vue and register.vue components, also I'm using the drawer.vue page as the core component, i.e I'm using the drawer.vue component in the whole project or in all other components.
The problem here is that I do not want to use drawer.vue component in login.vue and register.vue components.
I have tried this to restrict the register.vue component by doing "v-if="$route.name !== 'register'" in the app.vue file.i.e.
<template>
<v-app>
<core-toolbar v-if="$route.name !== 'register'" />
<core-drawer v-if="$route.name !== 'register'" />
<core-view />
</v-app>
</template>
The problem here is that I am unable to restrict the login.vue component, I'm only be able to restrict the register component, does any one have better solution for this?
vue.js
I am building the web-app, which includes the authentication page like login.vue and register.vue components, also I'm using the drawer.vue page as the core component, i.e I'm using the drawer.vue component in the whole project or in all other components.
The problem here is that I do not want to use drawer.vue component in login.vue and register.vue components.
I have tried this to restrict the register.vue component by doing "v-if="$route.name !== 'register'" in the app.vue file.i.e.
<template>
<v-app>
<core-toolbar v-if="$route.name !== 'register'" />
<core-drawer v-if="$route.name !== 'register'" />
<core-view />
</v-app>
</template>
The problem here is that I am unable to restrict the login.vue component, I'm only be able to restrict the register component, does any one have better solution for this?
vue.js
vue.js
edited Mar 25 at 11:09
halfer
15k760122
15k760122
asked Mar 25 at 4:42
Robin PrajapatiRobin Prajapati
165
165
When app loads, by default loadcore-drawer&core-toolbarwith false and when userloginorregisterinto the app, store the user value in localstorage and make the flagtrue. Hope this works!
– varit05
Mar 25 at 4:53
Is there a route to the login component? If so, why are you not adding it to thev-ifcondition? You can use this syntax:['register', 'login'].includes($route.name)
– Rashad Saleh
Mar 25 at 11:20
ya, there is route for login and register both, sorry but i didnt get you, can you please elaborate, about what you are saying @RashadSaleh
– Robin Prajapati
Mar 25 at 15:44
add a comment |
When app loads, by default loadcore-drawer&core-toolbarwith false and when userloginorregisterinto the app, store the user value in localstorage and make the flagtrue. Hope this works!
– varit05
Mar 25 at 4:53
Is there a route to the login component? If so, why are you not adding it to thev-ifcondition? You can use this syntax:['register', 'login'].includes($route.name)
– Rashad Saleh
Mar 25 at 11:20
ya, there is route for login and register both, sorry but i didnt get you, can you please elaborate, about what you are saying @RashadSaleh
– Robin Prajapati
Mar 25 at 15:44
When app loads, by default load
core-drawer & core-toolbar with false and when user login or register into the app, store the user value in localstorage and make the flag true. Hope this works!– varit05
Mar 25 at 4:53
When app loads, by default load
core-drawer & core-toolbar with false and when user login or register into the app, store the user value in localstorage and make the flag true. Hope this works!– varit05
Mar 25 at 4:53
Is there a route to the login component? If so, why are you not adding it to the
v-if condition? You can use this syntax: ['register', 'login'].includes($route.name)– Rashad Saleh
Mar 25 at 11:20
Is there a route to the login component? If so, why are you not adding it to the
v-if condition? You can use this syntax: ['register', 'login'].includes($route.name)– Rashad Saleh
Mar 25 at 11:20
ya, there is route for login and register both, sorry but i didnt get you, can you please elaborate, about what you are saying @RashadSaleh
– Robin Prajapati
Mar 25 at 15:44
ya, there is route for login and register both, sorry but i didnt get you, can you please elaborate, about what you are saying @RashadSaleh
– Robin Prajapati
Mar 25 at 15:44
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55331372%2fis-there-any-way-to-use-one-component-page-in-vue-js-while-restricting-the-other%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55331372%2fis-there-any-way-to-use-one-component-page-in-vue-js-while-restricting-the-other%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
When app loads, by default load
core-drawer&core-toolbarwith false and when userloginorregisterinto the app, store the user value in localstorage and make the flagtrue. Hope this works!– varit05
Mar 25 at 4:53
Is there a route to the login component? If so, why are you not adding it to the
v-ifcondition? You can use this syntax:['register', 'login'].includes($route.name)– Rashad Saleh
Mar 25 at 11:20
ya, there is route for login and register both, sorry but i didnt get you, can you please elaborate, about what you are saying @RashadSaleh
– Robin Prajapati
Mar 25 at 15:44