[英]How to fix the behavior of this wijmo popup when I update an *ngIf condition
I have wijmo popup with some content inside, there is a ng-container with a *ngIf condition that if evaluates to true shows X and else show the ng-template. 我有一些内容的wijmo弹出窗口,有一个带有* ngIf条件的ng容器,如果if评估为true,则显示X,否则显示ng-template。 The problem is that if I update the condition inside the ng-container to show the else statement, this causes to close the wijmo popup(else statement is shown rapidly before closure). 问题是,如果我更新ng-container内的条件以显示else语句,这将导致关闭wijmo popup(在关闭之前迅速显示else语句)。
If I update the condition outside the ng-container(still inside wijmo popup) the behavior is correct. 如果我在ng-container外部更新条件(仍在wijmo弹出窗口内),则行为是正确的。 I tried the same code outside a wijmo popup and the behavior is correct. 我在wijmo弹出窗口外尝试了相同的代码,并且行为正确。
<wj-popup id="wj_popup_1 [modal]="true">
<ng-container *ngIf="!estListeTropLongue; else messageListeTropLong">
<button (click)="estListeTropLongue = true"></button>
</ng-container>
<ng-template #messageListeTropLong>
<div class="message-liste-trop-long">Veuillez saisir des caractères pour
lancer la recherche</div>
</ng-template>
</wj-popup>
The wijmo popup shouldn't close and show the ng-template information but the popup closes without any console error. wijmo弹出窗口不应关闭并显示ng-template信息,但该弹出窗口将关闭且没有任何控制台错误。
Thank you 谢谢
You could set the hide trigger of the wijmo popup to 'None'; 您可以将wijmo弹出窗口的隐藏触发器设置为“无”;
<wj-popup id="wj_popup_1 [modal]="true" [hideTrigger]="None">
<ng-container *ngIf="!estListeTropLongue; else messageListeTropLong">
<button (click)="estListeTropLongue = true"></button>
</ng-container>
<ng-template #messageListeTropLong>
<div class="message-liste-trop-long">Veuillez saisir des caractères pour
lancer la recherche</div>
</ng-template>
</wj-popup>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.