InvalidPipeArgument:',subsection,subsection' for pipe' AsyncPipe'堆栈跟踪:

时间:2017-10-16 08:33:36

标签: firebase angularfire

 this.items = this.itemsRef.snapshotChanges().map(changes => {
return changes.map(c => ({ key: c.payload.key, 
                          detail:   c.payload.val().detail, 
                          tittle: c.payload.val().name , 
                          sub: c.payload.val().sub
}));

外循环正在查找,但内循环显示错误 内循环

 <mat-menu #menu="matMenu" *ngFor="let sub of item.sub | async">
       <button mat-menu-item>
         <mat-icon>dialpad</mat-icon>
         <span>loop</span>
      </button>
    </mat-menu>

firebase结构

exam

    1

       detail: DETAIL

       image: IMAGE

       name: NAME

         sub-

              1: subsection 
              2: sunsection 

    2

       detail: DETAIL

       image: IMAGE

        name: NAME

            sub-

                 1: subsection

                 2: subsection

                 3:subsection

                 4: subsection

&#34; sub中的所有内容:c.payload.val()。sub&#34; subsection进入列表的单行瞬间我需要列表中的子部分,以便我可以遍历循环

0 个答案:

没有答案