I’ve been finding myself using Maps and Sets quite a bit lately. This is becoming especially true when I traverse through an array, or array of arrays, reducing it down to a set of unique, or key-value pairs. As a result, I recently had to write a Pipe similar to one that I previously wrote in order to iterate over Map and Set keys and values using ngFor. At the time of this writing, ngFor doesn’t natively support the Set and Map data types.

Source: Looping Over Maps and Sets in Angular 2’s ngFor | WebCake

Posted in: Articles.
Last Modified: April 1, 2017

Leave a Reply