in my application, I tracking for session time
@Effect()
session$: Observable<Action> = this.actions$
.ofType(authAction.RESET_SESSION)
.switchMap(_ => Observable.of({ type: authAction.LOGOUT })
.delay(600000);
*every time that RESET_SESSION action called, the logout action wait 10 minutes.
in my application, i get session time from the server and store on state after login. how I can use this store value in delay?! ( because in ngrx store return observable and not object of state)
something like this:
@Effect()
session$: Observable<Action> = this.actions$
.ofType(authAction.RESET_SESSION)
.switchMap(_ => Observable.of({ type: authAction.LOGOUT })
.delay(this.store.pluck('auth','sessionTime'));