1

I try to send a response from the WindowComponent (child) to the parent component, the onClose observable is supposed to return an observable, but I'm setting it to return that and it doesn't work

// parent component

this.windowService
        .open(WindowFormEditDocumentComponent, {
          title: `Edit Document`,
          context: {
            formId: this.selection.selected[0]["formId"],
            id: this.selection.selected[0]["_id"],
            recipient: this.selection.selected[0]["recipient"],
          },
          windowClass: "background",
        })
        .onClose.subscribe((data) => {
          console.log("aquiv", data); // undefined
        });

// child component

    closed$ = new Subject();
    get onClose() {
     return this.closed$.asObservable();
   }


     this.closed$.next("test");

https://akveo.github.io/nebular/docs/components/dialog/api#nbdialogservice

Franavi
  • 47
  • 8

0 Answers0