Angular 8到9升级材料索引无法正常工作

时间:2020-07-14 21:54:01

标签: angular8 angular9

然后使用t索引
在角度9中产生错误在角度8中起作用。

1 个答案:

答案 0 :(得分:0)

 @angular\cdk\__ivy_ngcc__\fesm2015

 add a try()catch() on material table.ts 

  ngOnDestroy() {
    this._rowOutlet.viewContainer.clear();
    try{
        this._noDataRowOutlet.viewContainer.clear();
    }catch{}
    this._headerRowOutlet.viewContainer.clear();
    this._footerRowOutlet.viewContainer.clear();
    this._cachedRenderRowsMap.clear();
    this._onDestroy.next();
    this._onDestroy.complete();
    if (isDataSource(this.dataSource)) {
        this.dataSource.disconnect(this);
    }
   }