title: Return Observable in canDeactivate not working
body: <p>I have a confirm/cancel modal dialog that pops up when a user leaves a route. I do this by using a guard with the canDeactivate method. However I want canDeactivate to wait until it gets a response from the modal before returning anything.</p>
  
  <p>I have tried to do this by returning an observable but it is not working. </p>
  
  <pre><code>canDeactivate(): Observable&lt;boolean&gt; | boolean {
      if(this.isFormStarted()) {
          this.formService.showExitModal(true);
          return this.formService.getModalSelectionObservable();
      }
      else {
          return true;
      }
  }
  </code></pre>
  
  <p>Nothing is happening when I click confirm even though I can see that the observable is working fine when I do a console.log inside the if block</p>
  
  <pre><code>this.formService.getModalSelectionObservable().subscribe(
          value =&gt; console.log("dialog value: " + value)
      );
  </code></pre>
  
  <p>Here is how the form service looks.</p>
  
  <pre><code>private modalConfirmation = new Subject&lt;boolean&gt;();
  
  public setModalSelectionObservable(confirmLeave: boolean) {
      this.modalConfirmation.next(confirmLeave);
  }
  public getModalSelectionObservable(): Observable&lt;boolean&gt; {
      return this.modalConfirmation.asObservable();
  }
  </code></pre>