import { Component, NgZone } from '@angular/core';
import { Store } from '@ngrx/store';
import { selectFoo } from '../../store/foo/foo.selectors';
@Component({
templateUrl: './foo.component.html',
})
export class FooComponent {
constructor(private zone: NgZone, private store: Store) {
setTimeout(() => {
this.zone.runOutsideAngular(() => {
});
}, 500);
}
handleEvent(event: any) {
this.store.select(selectFoo).subscribe((value) => {
this.zone.run(() => {
});
});
}
}