简体   繁体   中英

Angular - *ngFor

In my Angular project, I do not know why but *ngFor don't show me one tag:

without *ngFor

没有“*ngFor”没有“*ngFor”

with *ngFor

使用 *ngFor使用 *ngFor

Thanks

Use Like This <li *ngFor="let user of users">{{ user.name }}</li>

*ngFor acts as a loop, I can see you have not entered anything inside ngFor which makes it run 0 times

Enter some condition like *ngFor ="let recipe of recipes"

it will surely display for number of items in recipes

I just resolve the issue.

Had a component inserted (app-recipe-item) that was overlay code.

Thanks all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM