Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Disable multiple component in many page in big VueJS application?

Hi everyone, thank you for supporting me about this stuff!

I have an use-case that I have 2 host run in the same project, for example : host1: "sale.app.com", host2: "hr.app.com". In my project I have many re-usable components using in many pages ( , ,...), so in case in "hr.app.com", I don't want to show those components, I want disable them in "hr.app.com"

=> First approach I can make it up is: I can check in single component with routes.name. But those components're used in many place in my app, there will be big duplication code. So I don't to use this approach. I don't want this approach like below.

<project v-if="['app.sale'].indexOf($route.name) > -1"></project>

So does you guy have any approach for my use-case. Something like vue-router machanism or something that I don't know. Please let me know if you guys have any recommendation for this use-case.

Thank you guy so so much !! 
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!