mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-23 02:40:14 +01:00
feat: update to Angular 6 (#1684)
This commit is contained in:
parent
fa3cdf731b
commit
06d2197583
18 changed files with 5448 additions and 4039 deletions
|
|
@ -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()});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue