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

258
Vistas
How to Pass URL to iFrame in Vue.js

I have no experience with Vue or JS.

I want to pass a YouTube link from data() to iFrame.

Can this be done?

If so what steps are necessary to do so?

The code below shows what I have so far, though I'm not even sure if it's correct, as this is my first time in Vue.js and JS world.

I have looked here and elsewhere for ideas on how to do this but have not yet found anything I can use.

Any helpful tips are greatly appreciated, thank you.

<template>
   
    <div>
           
          <iframe width="800" height="230" src=this.link></iframe>
                  
    </div>
  
</template>

<script>

import axios from "axios";

export default{
    
     name:"Camera",
     data(){
         return{
         link:"https://www.youtube.com/embed/08Xmfi1QIxc",
         
     };
     },
    methods:{
        
        OnSelectCam(link){
            this.link = link;
        },    
            
        },
   
}   
   
</script>

<style scoped>
</style>

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

 <iframe width="800" height="230" :src="link"></iframe>

You need to add : before src and "" to the variable name. You don't need this. inside the template.

about 4 years ago · Juan Pablo Isaza Denunciar

0

You need to bind your link value to the src attribute of your iframe like this <iframe width="800" height="230" :src=this.link></iframe>

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