title: Right approach to display success, error messages via NGRX
body: <p>I know two solutions for this problem, first one is to keep message in your state which doesn't seem good, second one is to subscribe to an <code>ActionSubject</code> which I currently use to display messages.</p>
  
  <p>Is there any other solution for this ? Also how to set a CSS class in template, not in component ?</p>
  
  <p>Here is my example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> this.actionSubject.subscribe(action =&gt; {
        if (action.type === fromActions.LOGIN_SUCCESS) {
          this.message$ = action.payload.message;
          this.messageClass = 'alert alert-success';
        }
        if (action.type === fromActions.LOGIN_FAILURE) {
          this.message$ = action.payload.error.message;
          this.messageClass = 'alert alert-danger';
          this.LoginForm.reset();
        }
      })</code></pre>
  </div>
  </div>
  </p>
  
  <p>It seems too long, not DRY, I should do this in every component where I expect to have a message. </p>