aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/app.component.ts
blob: dc4bc88c9177bed21d0d2e7a6311bfed83112d49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import {Component} from '@angular/core';
import {NgRedux} from "@angular-redux/store";
import {AppState} from "./shared/store/reducers";
import '../style/app.scss';

@Component({
  selector: 'vid-app',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  constructor(private store: NgRedux<AppState>) {
    store.subscribe(()=>{
      sessionStorage.setItem('reduxState', JSON.stringify(store.getState()));
    });
  }
}