Refs & Ref Attribute - Referencing in vuejs using ref - Vuejs tutorials - Tutorial 23

Publicado el: 17 marzo 2019
en el canal de: JD Solanki
5,217
36

[DISCOUNTED] Master CSS Grid Course: https://bit.ly/2NONxxE

Refs in vuejs - in this lecture we will learn how can you use $refs to access DOM element in vuejs. Refs is used to get the reference of DOM element in vuejs. from that reference, you can get detailed information/property of that element.

We will use input element and use ref attribute on that element to reference it later. Now we can access all referenced DOM elements using this.$refs which will give us object containing ref elements.

In our example, we will see how to get $refs object and getting individual ref element. We will also see how can you can attribute of ref element using refs.

Later in this video, we will look at ref and v-for. When v-for is used for looping over elements. We can not explicitly define ref attribute. For this, we can specify one single ref and that will return an array of all items in the loop. Now you can use that array and use index to get the desired element.

Support me:
Youtube: Subscribe, Share, like etc.
PayPal: PayPal.Me/thedigitalsight
Patreon:   / thedigitalsight  

Follow me:
Twitter:   / jd13400010  


En esta página del sitio puede ver el video en línea Refs & Ref Attribute - Referencing in vuejs using ref - Vuejs tutorials - Tutorial 23 de Duración hora minuto segunda en buena calidad , que subió el usuario JD Solanki 17 marzo 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 5,217 veces y le gustó 36 a los espectadores. Disfruta viendo!