Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Forum About
The video for this lesson is currently being updated, please read the transcript instead.
Build a Single-Page App with Vue Router & Vue CLI > Lesson 47

Directive low-level DOM access

In the last lesson, we set up our custom directive and can now access the element the directive is applied to and the data passed to it in the mounted hook.

In this lesson, we're going to add a new child element to display the number of seats.

Creating span child element

Let's begin by creating a new span element. To do this we'll use document.createElement("SPAN") and assign this to a variable span.


Back to course page
Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Forum
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom