Created
July 3, 2020 11:10
-
-
Save msarsha/48d33f30830745b59cf7aa199a23d2e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
storeList$: Observable<Map<string,number>>; | |
stores$: Observable<string[]>; | |
ngOnInit() { | |
this.stores$ = this.itemsQuery.selectAll().pipe(map(entities => | |
entities.map(entity => entity.store) | |
// .filter((elem, index, self) => { | |
// return index === self.indexOf(elem); | |
// }) | |
)); | |
this.storeList$ = this.stores$.pipe(map((stores) => this.countItemsPerStore(stores))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment