bug: *ngFor not working in <ion-item>/ <ion-label> combination
See original GitHub issueType: <span ionic-type>bug</span>
Ionic Version: <span ionic-version>2.x</span>
Platform: <span ionic-platform>all</span>
<span ionic-description>I have a problem with *ngFor inside a <ion-item>
tag.
Not working: The div is not rendered.
<ion-item>
<ion-label stacked>Test</ion-label>
<div *ngFor="let r of [0,1,2,3]">Test</div>
</ion-item>
Working:
<ion-item>
<ion-label stacked>Test</ion-label>
</ion-item>
<div *ngFor="let r of [0,1,2,3]">Test</div>
Is this by design? Or has it to do with ng2?</span>
<span is-issue-template></span>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
bug: *ngFor not working in <ion-item>/ <ion-label ... - GitHub
I have a problem with *ngFor inside a <ion-item> tag. Not working: The div is not rendered. ... Is this by design? Or...
Read more >ngfor does not work when displaying multiple cards in ionic ...
I think the error was in the forEach when adding them. I applied another logic using only the map. code
Read more >Is it a problem in <ion-list> or <ion-item> or the combination of ...
I am trying to use the following code to show a list of items with a radio-button () on left in the item...
Read more >Building an Ionic 4 Pokédex with Search, Infinite Scroll ...
But in this case with the given API we encounter a few problems: ... *ngIf="pokemon.length == 0"> <ion-item *ngFor="let i of [1,2,3,4,5]"> ...
Read more >Blog - Crojach Software
While working on a project I came across a situation where I needed to know if a button was clicked by a user...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanx, @xr0master for giving advice. Found it right inside the docs here (see “Content and Inputs” section). The
item-content
attribute is strictly necessary:Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.