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

129
Views
Generate specific template in Vue

Is there any way to generate specific template in beforeCreate hook according a statement? I have three roles in my program and I want to generate a specific template foreach roles.

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

0

Maybe you could share some code, but what is used in most situations like this could be something as this example :

in your data set something like this:

role: undefined

and set this role in something like Created or Mounted

In your template you can use several v-if statements

// template 1
.div(v-if='role === "staff"')
  content here

// template 2
.div(v-if='role === "visitor"')
  content here

// template 3
.div(v-if='role === "ceo"')
  content here
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!