Didn't get output from Angular cloud Firestore using routerLink
https://stackoverflow.com/questions/47149153/didnt-get-output-from-angular-cloud-firestore-using-routerlink
Any suggestion? When I go back, from an add form the list disappear
Thanks
Hi, This setup has helped me out, so thanks. I also trying to add a router arrangement with home '/' page that navigates to '/items' where the list is. Works the first time, then navigating back to home '/' and back into '/items', the list does not re-appear, just displays the "There are no items...'.
Not sure where to look.
Hi @rangiesrule, did you resolve this issue? I have the same problem right now and I think is related to the async pipe that is not called in the *ngFor. when I add the async no items are displayed at all not even at the first time loading, and the error is the following one:
ItemsComponent.html:9 ERROR Error: InvalidPipeArgument: '[object Object],[object Object],[object Object],[object Object],[object Object]' for pipe 'AsyncPipe'
Probably the error it's in the item component when the item service is called and is subscribed to getItems() inside ngOnInit()
I don't know if this is the best way but I unsubscribed from the itemService in ngOnDestroy... so roughly this in the item component..
export class ItemsComponent implements OnInit, OnDestroy { ..... subscribedData: Subscription; }
ngOnInit() { this.subscribedData = this.itemService.getItems().subscribe(items ..... .... }
ngOnDestroy(): void { this.subscribedData.unsubscribe(); }
After doing this the data reloads on routerLink navigation...