Get an overview of ngif and ngFor. ngIf removes or recreates a portion of the DOM tree based on an expression. If the expression assigned to ngIf evaluates to false, then the element is removed from the DOM; otherwise a clone of the element is reinserted into the DOM. The NgFor directive instantiates a template once per item from an iterable. The context for each instantiated template inherits from the outer context with the given loop variable set to the current item from the iterable.
- [Instructor] You can think of directives as custom…HTML elements or attributes that's used to extend…our HTML to make it much more flexible.…Now they can either be custom or built-in.…Previously when we referenced mm-movies,…as in line eight here, it was a directive…to display our movies-list template…which is right over here on line five.…And to make it easier to see, you can right click…on the first tab app.components…and make sure that the second tab…for movies-list.components is also open,…and just click on New Vertical Tab…with the focus on the first,…and then you can see them side by side.…
So on line four in movies-list.components.ts,…we have our selector which is assigned a value of mm-movies.…That essentially is going to be working as a directive…on the second tab app.components.ts…on line eight.…That is a directive, and it's a custom one,…but in addition to creating custom directives,…we can use Angular's built-in directives.…
The type of built-in directives that we're going to be…looking at are structural directives,…
- Creating components
- Bootstrapping components
- Working with templates
- Using directives and interpolation
- Binding and transforming data
- Creating advanced and nested components
- Creating services
- Obtaining data with HTTP calls
- Configuring routes
Skill Level Intermediate
1. Course Overview
3. Directives, Interpolation, and Templates
5. Advanced Components
7. Obtaining Data with HTTP
- 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.