feat: update to Angular 6 (#1684)

This commit is contained in:
Dmitry Nehaychik 2018-05-10 23:48:39 +03:00 committed by GitHub
parent fa3cdf731b
commit 06d2197583
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 5448 additions and 4039 deletions

View file

@ -1,8 +1,7 @@
import { Injectable } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { Location } from '@angular/common';
import { filter } from 'rxjs/operator/filter';
import { filter } from 'rxjs/operators';
declare const ga: any;
@ -16,7 +15,9 @@ export class AnalyticsService {
trackPageViews() {
if (this.enabled) {
filter.call(this.router.events, (event) => event instanceof NavigationEnd)
this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
)
.subscribe(() => {
ga('send', {hitType: 'pageview', page: this.location.path()});
});