title: Angular Observables DialogWindow SyncFusion
body: <p>I'm trying to add frontend (Angular) to backend application and I have very little experience in this regard, so I got stuck. </p>
  
  <p>The following code prints Error. <br> The code is related to the pop-up window with two options: OK and QUIT. <br> This happens when OK is choosen. <br> The code is supposed to remove data from DB (what happens) and hide pop-up window (what does not happen). </p>
  
  <pre><code>private deleteNeed: EmitType&lt;object&gt; = () =&gt; {
    console.log(this.needToDelete);
    this.needService.delete(this.needToDelete).subscribe( r =&gt; {
      this.toastService.success('Need deleted!');
      this.ejDialog.hide();
      this.loadNeeds();
    },e =&gt; {
      this.toastService.error('Error');
      console.log(e);
      }
     );
  }
  </code></pre>
  
  <p>For some reason the lines: </p>
  
  <pre><code>this.toastService.success('Need deleted!');
    this.ejDialog.hide();
    this.loadNeeds();
  </code></pre>
  
  <p>seem to be ignored and execution goes to the error part. <br> Method 'hide' is working properly, what I can know because if on the above said pop-up window the QUIT button is choosen all works properly and the window is hidden. <br> When button OK is clicked the data (Need) is deleted from the DB, however the pop up window stays and to delete this "QUIT" button must be clicked. <br> I have no idea why. <br> <br> Does anyone have similar experience? <br></p>
  
  <p><br>Details of this.needService.delete : <br></p>
  
  <pre><code>  constructor(private needService : NeedService,
            private toastService: ToastService) {
            this.dataManager = new DataManager({
            json: this.needsList, adaptor: new 
            NeedsDataAdaptor(this.needService)
           });
           }
  
   delete(need: Need) : Observable&lt;Need&gt; {
          console.log('Need deleted!');
          console.log(need);
          return this.http.patch(urlDel, need).pipe(
          map(res =&gt; res.json())
          );
          }
  </code></pre>