Join Justin Schwartzenberger for an in-depth discussion in this video Components, Bootstrap, and the DOM, part of Angular 2 Essential Training (2016).
- [Voiceover] Angular is built upon components. The starting point of an Angular app is the bootstrapping of the initial parent component, much like the HTML Dom tree, that starts with an HTML element, and then branches down from there, Angular runs on a component tree model. After Angular loads the first component with the bootstrap call, it then looks within that component's HTML view, and sees if it has any nested components. If so, Angular finds matches and runs the appropriate component code on those. This repeats for each component down the tree.
A component in Angular is used to render a portion of HTML, and provide functionality to that portion. It does this through a component class, in which you can define application logic for the component. For example, you can have a MediaItemComponent that can have a property named mediaItem, that represents the data for a mediaItem, and that component can also have a method called onDeleteClick, that can handle raising the delete mediaItem event. With each component in Angular, you can specify an HTML template, the markup that will get rendered, and through the use of the component class, and how Angular renders the component, you can display the data for the mediaItem property in your template.
And Angular provides an easy syntax, known as the template syntax, to wire up to Dom events within your template. So, you can wire up the click event on a button, to the onDeleteClick method. You can even use components within components. This is where the component tree comes in to play. Much like how you write HTML, creating nested elements within elements, you can build out your Angular apps by having components rendering components within their templates. Each component gets configured with a selector, which tells Angular what markup element tag to associate the component class logic with.
When you build a component in Angular, you are creating support for a new custom element for the Dom.
- What is Angular?
- Setting up an Angular template
- Creating a component
- Displaying data
- Working with events
- Using two-way data binding
- Creating a subcomponent
- Using the built-in HTTP module
- Using the built-in router module
Skill Level Intermediate
AngularJS and WordPress: Building a Single-Page Applicationwith Roy Sivan31m 52s Intermediate
Building a Mobile App with AngularJS 1 and Ionicwith Ray Villalobos3h 31m Intermediate
1. Architecture Overview
3. Directives and Pipes
5. Dependency Injection and Services
Next steps1m 20s
- 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.