Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

274
Vistas
Check URL $route param value using v-if in vue js

How can I check the meta value of my url using v-if in vue.js ?

Assuming that i have this url : http://127.0.0.1:8000/setting

And I want to make condition in my v-app like this :

<v-app v-if="(if 'setting' is in the url)">
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

<v-app v-if="url.indexOf('http://127.0.0.1:8000/setting') > -1 ? true : false">

if there it is inclue 'http://127.0.0.1:8000/setting' return true

else return false

about 4 years ago · Juan Pablo Isaza Denunciar

0

Well,I would create a property in data(), like this:

data() {
 urlHasSetting: false
}

in my created() lifecycle method I would check:

var parts = window.location.href.split("/")
var hasSetting = parts.filter("settings")[0]

if (hasSettings) this.urlHasSetting = true

and you will need to create a computed that return urlHasSetting data.

computed: {
  settingComputed() {
    return this.urlHasSetting
  }
}

and you will be able to use your settingComputed in your v-if

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda