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
Here, in parentComponent where initialState data is being sent using config param in modalService.show:
const initialState = {
data: "Test Data"
};
this.modalService.show(ModalContentComponent, {initialState});
Access the data in ModalContentComponent by simply defining exact same named variable, i.e., data: string;
You will be able to access value of data in ModalContentComponent.html and ModalContentComponent.ts.