Skip to content

Commit

Permalink
Move to rxjs 6 operartors
Browse files Browse the repository at this point in the history
  • Loading branch information
tobi-or-not-tobi committed Jun 7, 2018
1 parent 0a5646a commit 318e985
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/app/components/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/pluck';
import { Observable } from 'rxjs';
import { filter, pluck } from 'rxjs/operators';

@Component({
selector: 'app-root',
Expand All @@ -16,6 +15,6 @@ export class AppComponent implements OnInit {
constructor(private router: Router) {}

ngOnInit() {
this.url$ = this.router.events.filter(event => event instanceof NavigationEnd).pluck('url');
this.url$ = this.router.events.pipe(filter(event => event instanceof NavigationEnd)).pipe(pluck('url'));
}
}

0 comments on commit 318e985

Please sign in to comment.