Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
448 views
in Technique[技术] by (71.8m points)

angular7使用ng2-pdf-viewer可以运行但是页面报错

如图,angular7需要pdf预览,选择npm? ng2-pdf-viewer ,可以运行,但是页面报了如图这个错误。

(Promise.allSettled is not a function
? ? at MessageHandler._deleteStreamController)

在GitHub看到有人说是要将zone升级到0.10以上版本,然而我们公司这个项目的版本不能动,因此想问下除了升级版本还有其他解决方法么?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

pdfjs 可能用到了 Promise.allSettled,但是宿主环境不支持,加一个 polyfill 就可以了
https://www.npmjs.com/package...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...