当我点击模型需要将组件插入模型<miniStatement></miniStatement>
miniStatement() {
const activeModal = this.modalService.open(statementHistory, {size: 'lg'});
activeModal.componentInstance.modalHeader = 'Mini Statement';
activeModal.componentInstance.modalContent = `<miniStatement></miniStatement> `;
}
}
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{modalHeader}}</h4>
<button class="close" aria-label="Close" (click)="closeModal()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{{modalContent}}
</div>
</div>