From the course: Learning Vue.js

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Configuring dynamic elements

Configuring dynamic elements - Vue.js Tutorial

From the course: Learning Vue.js

Start my 1-month free trial

Configuring dynamic elements

- [Instructor] In order to configure our Vue app so that it can manage part of our page, we'll add another script element down here making sure that it appears after the one that loads the Vue framework. Next I'm going to declare a new constant called FlashcardApp. And by the way, you'll see const used in this way in the Vue 3 guide as well. A discussion of why that makes sense as opposed to var or let is beyond the scope of this course, but feel free to ask in the Q&A tab if you want to know more about that. So this is not really the app itself, but an object that describes it by representing some options that we're going to pass to a method that will create the app. One of those options is the data that our app is going to work with, and we declare that with a function called data that returns an object. The object that the data function returns will contain, for now, just a property called deckName, the name of…

Contents