From the course: Vue.js 2 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating a component
- [Instructor] Let's take a look at what it would take to import one of the components we created earlier on our coat Pen project, into this new project. This will show you the difference between building things using the build tools and using specific components just in a regular page. So, here's the component, in the Vue JS project and I'm just going to select just that component. So, let me go ahead and close this tab up, and I'll just copy this right here and then I'll switch over to my project. And I want to add a new folder, if it's not there already. Sometimes when you download things from GitHub, the folder is empty, it's just going to get rid of it, so you may have to recreate that one. And then we're going to create a new file called Price.vue for our new component. And, a component normally consists of a template section, as well as at least a script section. And sometimes we have CSS, but for this one, we don't really have that. So I'm just going to paste everything into…