MatPaginator不确定 [英] MatPaginator gets undefined
本文介绍了MatPaginator不确定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have replicated thsi case: Angular 5 Material Table not getting data from service
但是,当我尝试从分页器访问任何属性时,会从该对象获取未定义的错误.
But when I try access any property from paginator I get undefined error from this objet.
有什么想法吗?
谢谢
推荐答案
我遇到了同样的问题.将mat-paginator标记放置在* ng之外如果我的问题解决了.确保没有任何条件,它可用于组件类.
I got the same issue. Placing mat-paginator tag outside *ngIf resolved my issue. Make sure it is available to component class without any conditions.
这篇关于MatPaginator不确定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文