87968: Automatic upgrade to NgRx 13

This commit is contained in:
Yura Bondarenko
2022-03-14 18:36:57 +01:00
parent 8f7389c83a
commit 8e4f1993bf
17 changed files with 182 additions and 182 deletions

View File

@@ -1,6 +1,6 @@
import { filter, map, pairwise } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import * as fromRouter from '@ngrx/router-store';
import { RouterNavigationAction } from '@ngrx/router-store';
import { Router } from '@angular/router';
@@ -12,7 +12,7 @@ export class RouterEffects {
* Effect that fires a new RouteUpdateAction when then path of route is changed
* @type {Observable<RouteUpdateAction>}
*/
@Effect() routeChange$ = this.actions$
routeChange$ = createEffect(() => this.actions$
.pipe(
ofType(fromRouter.ROUTER_NAVIGATION),
pairwise(),
@@ -23,7 +23,7 @@ export class RouterEffects {
})),
filter((actions: string[]) => actions[0] !== actions[1]),
map(() => new RouteUpdateAction())
);
));
constructor(private actions$: Actions, private router: Router) {
}