title: Angular 6: subscribe does not exist on type void
body: <p>I want to display success messages to user after submitting a form.</p>
  
  <p>form works perfectly when it come to submit the data but the flash message is not displayed and I get error: subscribe does not exist on type void</p>
  
  <p>Here is what I have done , </p>
  
  <p>Html: </p>
  
  <pre><code>&lt;form [formGroup]="angForm" novalidate&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4"&gt;Comment author&lt;/label&gt;
            &lt;input type="text" class="form-control" name="author" formControlName="author" #author /&gt;
          &lt;/div&gt;
          &lt;div *ngIf="angForm.controls['author'].invalid &amp;&amp; (angForm.controls['author'].dirty || angForm.controls['author'].touched)"
            class="alert alert-danger"&gt;
            &lt;div *ngIf="angForm.controls['author'].errors.required"&gt;
              Name is required.
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;label class="col-md-4"&gt;comment description&lt;/label&gt;
            &lt;input type="text" class="form-control" formControlName="description" #description/&gt;
          &lt;/div&gt;
          &lt;div *ngIf="angForm.controls['description'].invalid &amp;&amp; (angForm.controls['description'].dirty || angForm.controls['description'].touched)"
            class="alert alert-danger"&gt;
            &lt;div *ngIf="angForm.controls['description'].errors.required"&gt;
              description is required.
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;button (click)="addReview(author.value, description.value)" [disabled]="angForm.pristine || angForm.invalid" class="btn btn-primary"&gt;Add&lt;/button&gt;
          &lt;/div&gt;
        &lt;/form&gt;
  </code></pre>
  
  <p>component.ts:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { MoviesService } from '../movies.service';
  import { FormGroup, FormBuilder, Validators } from '@angular/forms';
  import { RouterModule, Routes } from '@angular/router';
  import { ActivatedRoute } from '@angular/router';
  import { HttpClient } from '@angular/common/http';
  import { Router } from '@angular/router';
  import { FlashMessagesModule, FlashMessagesService } from 'angular2-flash-messages';
  @Component({
    selector: 'app-movie',
    templateUrl: './movie.component.html',
    styleUrls: ['./movie.component.scss']
  })
  export class MovieComponent implements OnInit {
    angForm: FormGroup;
    // tslint:disable-next-line:max-line-length
    constructor(
      private flashMessages: FlashMessagesService,
      private fb: FormBuilder,
      private route: Router,
      private http: HttpClient,
      private activeRouter: ActivatedRoute,
      private moviesService: MoviesService) {
      this.createForm();
    }
    createForm() {
      this.angForm = this.fb.group({
        author: ['', Validators.required],
        description: ['', Validators.required]
      });
    }
    addReview(author, description) {
      this.moviesService.addReview(author, description).subscribe(data =&gt; {
        if (data.sucess) {
          this.flashMessages.show('You are data we succesfully submitted', { cssClass: 'alert-success', timeout: 3000 });
          this.route.navigate(['/movie']);
        } else {
          this.flashMessages.show('Something went wrong', { cssClass: 'alert-danger', timeout: 3000 });
          this.route.navigate(['/movie']);
        }
      });
    }
    ngOnInit() {
    }
  }
  </code></pre>
  
  <p>and here service .ts
   a</p>
  
  <pre><code>addReview(author, description) {
      const uri = 'http://localhost:8000/movies/comments/';
      const obj = {
        author: author,
        description: description
      };
      this
        .http
        .post(uri, obj)
        .subscribe(res =&gt;
            console.log('Done'));
    }
  </code></pre>
  
  <p>Here is app html component.</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;flash-messages&gt;&lt;/flash-messages&gt;
    &lt;router-outlet&gt;&lt;/router-outlet&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Question</strong>
  what is wrong with my code? is this the right way to dispaly flash message? am stuck out here , any help will be great </p>