我有以下模式,它执行删除验证文本被模态跟踪总是有效但是在放入jquery之后它只显示文本,如果我使用键盘。
我的模态
<ng-template #msgModal>
<div class="modal-body" style="padding-top: 10px;">
<p class="text-center">{{'Deseja deletar o encaminhamento?' | translate}}</p>
<div style="text-align: center">
<button (click)="deleteFWResearch(globalId)" class="btn btn-danger">{{'Sim' | translate}}</button>
<button (click)="modalRef.hide()" class="btn btn-danger">{{'Não' | translate}}</button>
</div>
</div>
</ng-template>
我的功能
[...]
@ViewChild('msgModal') msgModal: TemplateRef<any>;
[...]
let self = this;
$(document).on('click', '.delete', function (data: any) {
let id = $(this).attr('data-id');
self.modalRef = self.modalService.show(self.msgModal, {class: 'modal-sm'});
self.globalId = id;
});