Property 'take' does not exist on type 'Store<State>' ngrx/store
try to import it
import 'rxjs/add/operator/take';
for Angular > 6, Angular app bundle size are reduced using lettable operators, because they are tree-shakable
import { take } from 'rxjs/operators';
...
this.store.select('spaces').pipe(take(1)).subscribe();
In case of angular 6:
1) import from rxjs
import { take } from 'rxjs/operators';
2) use it with pipe
method
.pipe(take(1))
is a compatibility problem with the latest version of angular, you need rxjs-compat.
solution:
npm install --save rxjs-compat