Join Justin Schwartzenberger for an in-depth discussion in this video Structural directives—ngFor, part of Angular 2 Essential Training (2016).
- [Voiceover] Another common Angular…build in structural directive is ngFor.…The ngFor directive…is used to repeat mark up…when looping over some data.…Let's put the ngFor to use in the App.…We have another component…already created in the App…called Media Item List Component.…In the App component is updated to use that.…Let's take a look at that…Media-item-list.component.ts file.…This component is designed to render…out a list of media items.…And uses the media item component…to render each one.…
The class has a property named media items.…That have some static sample data set to it now.…A couple of media items.…Let's flip over to the HTML File…for this component.…And make use of the ngFor structural directive.…In the template mark up there's a section element,…with one media dash item element inside of that.…We want to have a media dash item element…for each media item…in the media items class property.…This can be done by putting asterisk ngFor,…on the media dash item element.…
And setting that equal to a statement.…
- 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.