title: Executing code after dispatch is completed while using ngrx
body: <p>In my sample Angular 2 application , I am using ngrx/store and ngrx/effects for state management.</p>
  <p>Below is one of the function in a component to add a new item.</p>
  <pre><code>addAuthor() {
      
      this.store.dispatch(addAuthorAction(this.fg.value));
      console.log('2')        
  } 
  </code></pre>
  <p>In the above code <code>this.store.dispatch(addAuthorAction(this.fg.value));</code> takes care of making an AJAX call to server and adding a new author to
  database, which is working fine.</p>
  <p>And because  <code>this.store.dispatch(addAuthorAction(this.fg.value));</code> is an <code>async</code> action , <code>console.log(&quot;2&quot;)</code> statement gets executed even before the AJAX call
  is completed.</p>
  <p>My question is , what needs to be modified so that console.log gets executed after store.dispatch is done.</p>