在文件完全呈现之前,使用ng2-pdf-viewer关闭模态会导致错误

时间:2019-01-08 13:04:47

标签: angular twitter-bootstrap npm

如果我在加载pdf之前遇到错误而关闭模型弹出窗口,则在我的angular 6项目中使用ng2-pdf-viewer npm,并在modelpopup中打开pdf。

Unable to initialize viewer TypeError: Cannot read property 'div' of undefined
 at backtrackBeforeAllVisibleElements (pdf_viewer.js:637)
 at getVisibleElements (pdf_viewer.js:684)
at PDFViewer._getVisiblePages (pdf_viewer.js:6435)
at PDFViewer.update (pdf_viewer.js:6451)
at pdf_viewer.js:5701
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:3820)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)

0 个答案:

没有答案