Open rcadhikari opened 7 years ago
import { Observable } from 'rxjs/Observable'; import { Store } from '@ngrx/store';
import { IState } from '../store/application-state'; import { ACTIVITY_TIMEOUT_OCCURRED } from '../../app.reducer';
@Injectable() export class AutoLogoutService {
constructor(
store: Store<IState>
) {
// In our example we're treating any change in global state
// as an example of user activity. So to start we need to
// just get an observable for the stream of state changes
//
// const state$ = store.asObservable() as Observable<IState>;
// tslint:disable-next-line:prefer-const
let state$: Observable<IState> ;