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;








0















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?










share|improve this question
























  • 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











  • 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

















0















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?










share|improve this question
























  • 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











  • 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













0












0








0








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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











  • 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











  • 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
















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












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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해