Angular Material v6 Mat-Footer - “Cannot read property 'template' of undefined”

£可爱£侵袭症+ 提交于 2019-12-04 08:35:58

FIXED: This was not made clear in the material documentation, but all columns must contain a <mat-footer-cell/> element, even if only one column will contain content.

You can define your own "tableFooterColumns" variable.

tableFooterColumns: string[] = ['total'];

and use it in the template (change "colspan" for your needs):

 <tr mat-footer-row *matFooterRowDef="tableFooterColumns" colspan="2"></tr>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!