我已经实现了弹出框来显示悬停在图标上的评论并有一个滚动条。但是当我从一个页面导航到另一个页面(路由器链接)时,出现以下错误:
这是我的代码:
<popover-content #myPopover
placement="top"
[animation]="true"
[closeOnClickOutside]="true">
<div style="max-height: 100px; min-width: 100px; overflow-y:auto">
{{comment}}
</div>
</popover-content>
<button type="button" class="btn" style="background-color: transparent;" (click)="showPopup();"
data-toggle="modal" data-target="#modalComment"
[popover]="myPopover"
[popoverOnHover]="true"
[popoverDisabled]="!comment"
[popoverCloseOnClickOutside]="false"
[popoverCloseOnMouseOutside]="true">
<i *ngIf="comment" class="fa fa-lg fa-comment" style="color:orange;"></i>
<i *ngIf="!comment" class="fa fa-lg fa-comment" style="color:silver"></i>
</button>
我导入了 NgbPopoverModule。 我使用:ngx-popover 0.0.16,Angular 8.
我希望能够从一个页面导航到另一个页面而不会出现此错误或刷新。