committed by
József Farkas
parent
ee1d8ec59e
commit
4e13f910dd
21
src/store/effects/macro.ts
Normal file
21
src/store/effects/macro.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { Actions, Effect } from '@ngrx/effects';
|
||||
|
||||
import 'rxjs/add/operator/map';
|
||||
|
||||
import { MacroActions } from '../actions';
|
||||
|
||||
@Injectable()
|
||||
export class MacroEffects {
|
||||
|
||||
@Effect()remove$: any = this.actions$
|
||||
.ofType(MacroActions.REMOVE)
|
||||
.map(() => {
|
||||
// TODO: Waiting for the fix: https://github.com/angular/angular/issues/10770
|
||||
// If state is empty router.navigate(['/macro']);
|
||||
// Else router.navigate(['/macro']);
|
||||
});
|
||||
|
||||
constructor(private actions$: Actions) {}
|
||||
}
|
||||
Reference in New Issue
Block a user