I\'m trying to use ngx-bootstrap-modal to pass data from a modal service into a modal component. The examples show this:
this.modalService.show(ModalContentCompo
You can also use the BsModalRef content
Like
my-modal.component.ts
export class MyModalComponent {
public myContent;
constructor(){}
}
calling your modal from some other component
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
...
public modalRef: BsModalRef;
constructor(public modalService: BsModalService){}
public openModal() {
this.modalRef = this.modalService.show(MyModalComponent);
this.modalRef.content.myContent= 'My Modal Content';
}
...