I use Angular 5 with version 5.2.9, and I use ngx-smart-modal, and when I open Modal, it does not present content and is very close to the top and reduced, the attached image is attached.
const reasons = '<h1>Reasons</h1>';
this.ngxSmartModalService.setModalData(this.sanitizer.bypassSecurityTrustHtml(reasons), 'reasonsModal');
this.ngxSmartModalService.getModal('reasonsModal').open();
<ngx-smart-modal #reasonsModal identifier="reasonsModal" (onDismiss)="clearModal()" (onClose)="clearModal()">
<div *ngIf="reasonsModal.hasData()" [innerHTML]="reasonsModal.getData()">
<pre>{{reasonsModal.getData}}</pre>
</div>
<button (click)="reasonsModal.close()">Closes</button>
</ngx-smart-modal>
Run codeHide result
source
share