0
我正在将Ionic2用于混合应用程序。我有一个要求,我需要的内容区域(离子内容)的高度+宽度。Ionic2,内容宽度和高度显示为0
我想
@ViewChild(Content) content: Content; console.log(this.content.contentWidth,this.content.contentHeight)
这是给0,0
当我尝试console.log(this.content.getContentDimensions());
它给
{"contentHeight":null,"contentWidth":525,"contentLeft":0,"scrollHeight":1023,"scrollTop":0,"scrollWidth":510,"scrollLeft":0}
我怎样才能得到离子含量(可视区域)的宽度和高度。