I am in LotoReviewTabComponent
and another component is imported here - import { ReviewComponent } from './loto.reviewdoc.component';
My requirement is to call a method of LotoReviewTabComponent
inside ReviewComponent
.
Reason ReviewComponent
is imported in LotoReviewTabComponent
is - there is a modalreference call in LotoReviewTabComponent
as below -
Const reviewModal = this.modalService.open(ReviewComponent, ngbModalOptions);
reviewModal.componentInstance.fileName = fileName;
when some event is performed in that modal - reviewModal, a method in LotoReviewTabComponent
has to be called.
how can this be achieved?.
You can use an Output event from angular in the ReviewComponent.
With this you can let the parent component (LotoReviewTabComponent) know that it has to do something. In this case, run a method.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.