我能够在click事件上加载模式,但是我想在方法调用上加载它吗?
<ng-template #NgbdModal2Content let-c="close" let-d="dismiss">
<div class="modal-header">
<h4 class="modal-title">Role Assign Fails for below application <i class="fa fa-times pull-right btn" (click)="c('Close click')" aria-hidden="true"></i></h4>
</div>
<div class="modal-body">
<div *ngIf="statusError.length > 0">
<ul *ngFor="let errorData of statusError" class="list-unstyled">
</ul>
</div>
</div>
类型脚本
getErrorApplicationRoleInfo(contentModal: any, listModal: any): void {
var statusError= listModal;
this.modalService.open(contentModal).result.then((result) => {
console.log(result);
});
// contentModal是我用于click事件以加载模态的东西,但是在这种情况下,我不想使用click事件,在这种情况下如何加载模型。