title: ReferenceError: NavigationEnd is not defined (Angular)
body: <p>I have a weird problem. I'm simply trying to navigate from one component to an another. I injected Router etc, but for some reason, I get an error that NavigationEnd is not defined. I tried this and that solution, but nothing works. Anyone knows what might be the problem?</p>
  
  <p>Here's the component:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { HttpClient, HttpHeaders } from "@angular/common/http";
  import { RouterModule, Router, ActivatedRoute, ParamMap} from '@angular/router';
  import { Event, NavigationStart, NavigationEnd, NavigationError } from '@angular/router';
  
  @Component({
    selector: 'app-subscribe-box',
    templateUrl: './subscribe-box.component.html',
    styleUrls: ['./subscribe-box.component.scss']
  })
  export class SubscribeBoxComponent implements OnInit {
  
    constructor(private http:HttpClient, private route: ActivatedRoute, private router: Router) { }
  
   ngOnInit() {
  
    }
  
    emailSubscribe(email) {
  
      this.router.navigate(["/subscribe-success"]);
  
    }
  }
  </code></pre>