I am using an observable called getContentfulEntry to retrieve data, while also passing data from another observable known as stateService.
this.langSubscription = this.stateService.getLanguage()
.subscribe(val => {
this.lang = val;
});
this.subscription = this.contentfulService.getContentfulEntry(this.footerEntryId, {locale: this.lang.toLowerCase()})
.subscribe(res => {
console.log('Footer Entries:: ', res);
// this.contentfulData = res;
this.filteredFooter = this.contentfulService.getFilteredEntryByProv(res, this.prov);
console.log('Filtered Footer:: ', this.filteredFooter);
});
Additionally, I am passing it as a parameter so that new data is fetched whenever this.lang is updated. However, the data in the view does not update automatically with this.subscription; manual refresh is required. Any suggestions on how to address this issue?