Top "Ngfor" questions

The Angular NgFor directive instantiates a template once per item from an iterable.

Angular 2+ - check if Pipe returns an empty subset of original list

I have a list of strings that I want to iterate through, but I want to be able to filter …

angular pipe ngfor
Angular2 nested *ngFor

I use an array to store a list of group objects and an array of a list of light objects. …

angular nested ngfor
Angular 2 - setting default value in dropdown when default is hard coded

I have the following dropdown. I want to set All Patients as the default value. <select [(ngModel)]="searchModel.careprovider"&…

javascript angular typescript ngfor angular2-ngmodel
Show more button in ngFor in angular2

I have a list of over 50 items. I would like to show only the first 10 items, and I would have …

angular button typescript show-hide ngfor
angular viewChild for dynamic elements inside ngFor

My template has something like this: <div *ngFor="let data of array"> <div #div></div&…

angular typescript ngfor
Looping using ngFor and skip nth element

I was wondering if there is a way in angular2 to loop through an array or a list using *ngFor …

angular ngfor
Populating table using 2 different *ngFor

Below is my array of JSON objects: { "tagFrequency": [ { "value": "aenean", "count": 1, "tagId": 251 }, { "value": "At", "count": 1, "tagId": 249 }, { "value": "faucibus", "count": 1, "tagId": 251 }, { "…

angular html-table ngfor
Ionic 4 horizontal scroll with ngFor

I'm at a loss. I can get horizontal scroll to work fine with just html and css but when i …

css angular ionic-framework ngfor ionic4
Angular: using both *ngFor and *ngIf with reference to index value in child elements

I would like to render objects from array observable in some grid-car components. In addition, I want to limit the …

angular ngfor angular-ng-if
*ngFor - Loop two arrays in the same level

I'm trying to loop two arrays by using one *ngFor but it doesn't show any element on the browser. I …

arrays angular ngfor