Join Michael Sullivan for an in-depth discussion in this video Registering and using components, part of Learning Vue.js.
- [Instructor] Now we'll start to actually create…some components and see how they work in practice.…You can see here that we've got our basic skeleton…for a Vue-enabled page with Bootstrap.…And I'm just gonna create a very simple component…like the ones we saw in the last video.…Again, my-component will be the custom tag name…that we use when adding this component to the page.…And this will just have a very simple template…with a single element.…
While it's not required, it's recommended to use a hyphen…in your custom tag name, which is actually part…of the W3C rules for custom tags.…To use this component on my page,…all I have to do is insert the start and end tags like so.…If I refresh this, I see the rendered version…of the markup that I was expecting.…Again, this isn't a very useful component, but we can apply…any of the Vue directives that we've seen so far.…For example, I could add a v-for with a looping variable, i,…and just use a number to make this repeat 1,000 times.…
Notice that, in the Vue DevTools,…
- Adding Vue to a webpage
- Thinking declaratively with data binding
- Methods and event handling
- Adding dynamic style and class attributes
- Using CSS transitions and animations
- Using Vue components
- Vue CLI
Skill Level Intermediate
Web Programming Foundationswith Morten Rand-Hendriksen58m 44s Beginner
What you should know1m 29s
1. The Simplest Form
2. Essential Directives, Options, and Tools
3. Enhancing User Interfaces
4. Vue Components
Next steps2m 32s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.