From: Kai Moritz Date: Mon, 29 Jun 2020 20:39:48 +0000 (+0200) Subject: WIP:Häh? X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=f62e01c05a4697e6a39843281864a29e55afa99a;p=examples%2Fangular-tour-of-heroes WIP:Häh? --- diff --git a/src/app/vorgang/vorgang.component.html b/src/app/vorgang/vorgang.component.html index 0a27107..1a2a5be 100644 --- a/src/app/vorgang/vorgang.component.html +++ b/src/app/vorgang/vorgang.component.html @@ -5,7 +5,11 @@ diff --git a/src/app/vorgang/vorgang.component.ts b/src/app/vorgang/vorgang.component.ts index cfd8560..78f093c 100644 --- a/src/app/vorgang/vorgang.component.ts +++ b/src/app/vorgang/vorgang.component.ts @@ -4,6 +4,7 @@ import { Vorgang } from '../vorgang'; import { Store, select } from '@ngrx/store'; import { Observable } from 'rxjs'; import { create } from '../actions/vorgang'; +import { tap, map } from 'rxjs/operators'; @Component({ selector: 'app-vorgang', @@ -17,7 +18,9 @@ export class VorgangComponent implements OnInit { constructor( private service: VorgangService, private store: Store<{ vorgang: Vorgang[] }>) { - this.vorgang$ = store.pipe(select('vorgang')); + this.vorgang$ = store.pipe(select('vorgang')).pipe( + tap((state) => console.log(`New state: ${JSON.stringify(state)}`)), + map((state: State) => state.vorgaenge)); } ngOnInit(): void {