无法导航出我在 angular 9

问题描述

我的 html 模板中有这个:

<div class="my-3" [ngxSummernote]="config"></div>

这在我的打字稿课上:

config = {
  placeholder: 'Description here',tabsize: 2,height: '200px',toolbar: [
    ['misc',['codeview','undo','redo']],['font',['bold','italic','underline','strikethrough','superscript','subscript','clear']],['fontsize',['fontname','fontsize','color']],['para',['style','ul','ol','paragraph','height']],],fontNames: [
    'Helvetica','Arial','Arial Black','Comic Sans MS','Courier New','Roboto','Times New Roman'
  ]
};

每当我单击浏览器后退按钮或尝试从组件导航时,我都会在浏览器控制台中收到此错误并且导航失败:

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'off' of undefined
TypeError: Cannot read property 'off' of undefined
at NgxSummernoteDirective.destroyEditor (ngx-summernote.js:413)
at NgxSummernoteDirective.ngOnDestroy (ngx-summernote.js:171)
at executeOnDestroys (core.js:14459)
at cleanUpView (core.js:14358)
at destroyViewTree (core.js:14122)
at destroyLView (core.js:14309)
at RootViewRef.destroy (core.js:15174)
at ComponentRef$1.destroy (core.js:34245)
at RouterOutlet.deactivate (router.js:9122)
at ActivateRoutes.deactivateRouteAndOutlet (router.js:4023)
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:41686)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)
at invokeTask (zone-evergreen.js:484)
at ZoneTask.invoke (zone-evergreen.js:469)

请问我做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)