title: Property 'distinctUntilChanged' does not exist on type 'Observable<Event>'
body: <p>Trying to upgrade to Angular 6 from 5 and got this error:</p>
  
  <blockquote>
    <p>ERROR in src/app/app.component.ts(26,23): error TS2339: Property
    'distinctUntilChanged' does not exist on type 'Observable'.</p>
  </blockquote>
  
  <p>I've imported distinctUntilChanged in app.module.ts:</p>
  
  <pre><code>import "rxjs/add/operator/distinctUntilChanged";
  </code></pre>
  
  <p>And my code in app.component.ts:</p>
  
  <pre><code>import { Component } from "@angular/core"; import { Router, NavigationEnd } from "@angular/router";
  import { TranslateService } from "@ngx-translate/core";
  import { GeoService } from "app/services/geo.service";
  import { ArbeteService } from "app/services/arbete.service";
  import { GoogleAnalyticsEventsService } from "app/services/google-analytics-events.service";
  
  import * as _ from "lodash";
  
  @Component({
      selector: "app-root",
      templateUrl: "./app.component.html",
      styleUrls: ["./app.component.scss"]
  })
  export class AppComponent {
  
          //Send pageview to Google Analytics
          router.events.distinctUntilChanged((previous: any, current: any) =&gt; {
          if (current instanceof NavigationEnd) {
              return previous.url === current.url;
          }
          return true;
      }).subscribe((x: any) =&gt; {
          googleAnalytics.emitVirtualPageView("Rekryteringsguiden", "Rekryteringsguiden");
      });
  </code></pre>
  
  <p>What am I missing here?</p>