cities: Observable<any>;
this.cities = this.fsProvider.collection('cities').map(cities => {
return cities.map(city => {
city.country = this.fsProvider.doc(`countries/${city.country_id}`);
return city;
});
});
city
включает country
информацию как Observable
. Поэтому, если я передаю city
на другую страницу как navParam
, просто this.navCtrl.push(AnotherPage, {city: city})
, я не могу получить информацию о стране на AnotherPage
.
Я только что добавил демо: https://stackblitz.com/edit/ionic-firestore.
Любые мысли приветствуются.