0

I'm having issues where the {{item}} are not being shown in separate list, after I added returnZero for keyvalue (so that key is not sorted), it is giving me an error for section.value and wouldn't compile with errors Type '{}' is not assignable to type 'NgIterable | null | undefined'. but when i try at stackblitz https://stackblitz.com/edit/keyvalue-pipe-a1qsns?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts it is working fine, but not at my other project

In html

<section *ngFor="let section of data.summary | keyvalue: returnZero; let j = index;">
   <label>{{ section.key }}:</label>
   <ul *ngIf="!!section.value">
      <ng-container *ngFor="let item of section.value; let i = index"> 
         <li>{{ item }}</li>
       </ng-container>
    </ul>
</section>

In Ts:

the data is defined as the following:

this.data = this.generateData();

generateData(): any {
 return {
  "summary": {
    "newFeatures": [
      "This is where a short description",
      "This is where a second short description",
      "This is where a third short description"
    ], 
    "changedFeatures": [
      "This is where a short description of changed would be placed",
      "This is where a second short description of changed would be placed"],
    "resolvedIssues": [
      "This is where a resolved issues of resolved would be placed"
    ],
    "knownIssues": [
      "This is where a known issues of known would be placed"
    ]
  },
  "details": {

       // more data here
   }  

  returnZero() {

       return 0;
  }

0