Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

*ngFor inside *ngFor

$
0
0

@ankitkaushik wrote:

Hi All,

I have a class defined in firebase which hierarchical in nature. Its about subscription plans where main node is having information related to main plan and there are certain child entries related to sub plan. Here is the json structure:

"paymentPlans" : [ null, {
    "planDetails" : [ null, {
      "Amount" : 1000,
      "Payment" : "One Time",
      "type" : "Registration"
    }, null, {
      "Amount" : 1500,
      "Payment" : "Monthly",
      "type" : "Workout"
    } ],
    "planName" : "Economy",
    "centerid" : 1
  }, {
    "plaDetails" : [ null, {
      "Frequency" : "One time",
      "Registration" : 1000
    } ],
    "planName" : "Gold",
    "centerid" : 1
  } ],

To show this inside HTML, here is the view which i want:

Economy
Registration(One Time): 1000
Workout(Monthly): 1500

Gold
Registration(One Time): 1000

To acheve this, i am trying to use *ngFor inside *ngFor but facing some challenges. Please suggest the right method to use *ngFor for this.

P.S: I am at very initial stage and open for storing data in some other format if that makes things simpler.

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



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