NgFor Child data add on parent ngFor


#1

Hello Everyone,

Below is my code (sampl)

HTML code: -

<div *ngFor="let all of allTask" >
    // want to add sum of (1+2+3)
    <div *ngFo = "let all_task of all">
      1. // 1
      2. // 2
      3. // 3     
    </div>
</div>

ts code : -

let data = "task": [
    {
      "date": "2016-12-12",
      "day": "Monday",
      "capacity": 8,
      "total_estimate_time": "0h0m",
      "task_list":[ {key : 1},{key : 2},{key : 3}]
}];
this.allTask = data;

Please have solutions, let us know.

Thanks