如果我在加载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)