<ul class="vorgang-result">
<li *ngFor="let vorgang of vorgang$ | async" >
- {{vorgang}}
+ {{vorgang.type}}:
+ vbId={{vorgang.vbId}},
+ vorgangId={{vorgang.vorgangId}},
+ produkt={{vorgang.zustand?.produkt}},
+ dlz={{vorgang.zustand?.dlz}}
</li>
</ul>
</div>
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',
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 {