I would liketo trigger a modal dynamically via typescript. I know this should be easy, so I'm probably looking over something.
Somewhere in Template:
<ng-template #adminmodal>.....Some content right here......</ng-template>
Component:
Trying to make a TemplateRef from the #adminmodal
@ViewChild('adminmodal', { read: TemplateRef }) _adminModalRef: TemplateRef<any>;
Trying to trigger and failing miserably
this.modalRef = this.modalService.show(this._adminModalRef);
It opens a modal, but with an empty modal-content, so there is something wrong with my approach.