Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by John for ngFor does not render elements into IOS browsers

Sounds like it might be a change detection issue. Are you using ChangeDetectionStrategy.OnPush? If so, then you'd need to manually call ChangeDetectorRefmarkForCheck() after changes. Or you might try using the async pipe, which would forgo the need for markForCheck()

ngOnInit() {  this.cars = this.carService.getAll()}

and

<h2>BOF</h2><div *ngFor="let car of cars | async">  {{car.name}}</div><h2>EOF</h2>

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>