I have an angular dialogservice which opens up a popup, the popup has one field whose text has to be captured once you click 'yes', how can I pass value back to parent from dialogservice
this.popupservice.addDialog(Component,
{
title: 'Confirmation',
message: 'test'
})
.subscribe((isConfirmed) => {
if (isConfirmed) {
// catch returnText here
return true;
} else {
return false;
}
});
export interface CompModel {
title: string;
message: string;
returnText: string;
}
export class Component extends
PopupComponent<CompModel, boolean>{
implements CompModel {
title: string;
message: string;
returnText: string
confirm() {
// send return from here
this.close();
}
}