'Did *ngFor usage change?
Before I go into this, the code was working great just awhile back and I haven't made changes, but I am wondering if Angular updated their variable referencing or what.
I have a JSON array that is raw and assigned to an any-type variable siteList.
When I run console.log(siteList) it spits out the JSON object perfectly.
Used to when I ran the code below everything worked and showed up just fine.
<div *ngFor="let site of siteList" class="card mat-elevation-z8" style="margin: 20px; border: 1px solid lightgrey;">
<div class="card-header" style="background: #f88d3d; color: white;">
{{site.Name}} - {{site.Age | date}}
<span *ngIf="site.Location != null">
-
<i class="fas fa-map-marker-alt"></i>
</span>
<mat-radio-button (click)="setSite(site.SiteId)" class="float-right"></mat-radio-button>
</div>
</div>
The strange thing is, it's making the appropriate amount of cards so it is taking in the object correctly. But none of my variable references are working like they used to. Is it because siteList is defined as any and not like a full class? I am just floored because I have not changed anything.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
