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

213
Views
How to set background-color with vue-router

I need to clarify this question: I am using the vue-router library to be able to create the routes of my project and I need to know how I can configure the background-color by routes. I was planning to do it this way:

import meeting from '../components/meeting.vue'
import { colors } from 'vuetify/lib'
Vue.use(VueRouter)
const routes = [
  {
    path: '/meeting/:roomId',
    name: 'meeting',
    component: meeting,
    meta: {
      backgroundColor:colors.transparent ,
     }
  },  
]
const router = new VueRouter({
  routes
});

But it doesn't work, any suggestions please

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could watch the route in the component you wish to change the background color and insert the business logic there.

To create watchers you can do so by:

watch: {
$route.path: function (val) {
  this.backgroundColor = whateverYouWant
},
}

If you want this behavior to be used in other components too you can also create a mixin with this watcher.

about 4 years ago · Juan Pablo Isaza Report
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!