[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
On this page of the site you can watch the video online Refs & Ref Attribute - Referencing in vuejs using ref - Vuejs tutorials - Tutorial 23 with a duration of hours minute second in good quality, which was uploaded by the user JD Solanki 17 March 2019, share the link with friends and acquaintances, this video has already been watched 5,217 times on youtube and it was liked by 36 viewers. Enjoy your viewing!