Angular 2 ngFor — Learn all Features including trackBy, why is it not only for Arrays ?

In this post we are going to go over the ngFor core directive, namely we are going to go over the following:

  • what ngFor does and what is its syntax
  • What are the most common errors associated to ngFor
  • Variable visibility
  • Finding the index position of an element
  • How to stripe a table using even and odd
  • Identifying the first and the last element of a list
  • How does ngFor track items, why it can be important for performance ?
  • How to use trackBy ?
  • When to use trackBy ?
  • Learn why ngFor is not only for arrays
  • A quick question for you at the end about learning

So let’s get started diving into ngFor ! Below you can also find a video version of this post if you prefer, and the running code of this post is available here.

Learn ngFor via a Video Tutorial

Please have a look also at the question just below, most of what we went over in this post can also be found in this YouTube video, subscribe to our channel to get more videos like this in your YouTube home screen:

Read the rest of This Post

Read the rest of the post here