Я создаю приложение ionic 5 и создаю страницу для хранения профилей пользователей, использующих Firebase. Затем я получил это сообщение из файла TS (я считаю). Пожалуйста, помогите мне указать, где я могу решить эту проблему, большое спасибо.
profile.page.ts
ngOnInit() {
this.profileService
.getUserProfile()
.get()
.then( userProfileSnapshot => {
this.userProfile = userProfileSnapshot.data();
this.birthDate = userProfileSnapshot.data().birthDate;
});
}
ProfilePage_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property 'get' of undefined
at ProfilePage.push../src/app/pages/profile/profile.page.ts.ProfilePage.ngOnInit (profile.page.ts:23)
at checkAndUpdateDirectiveInline (core.js:22099)
at checkAndUpdateNodeInline (core.js:23363)
at checkAndUpdateNode (core.js:23325)
at debugCheckAndUpdateNode (core.js:23959)
at debugCheckDirectivesFn (core.js:23919)
at Object.eval [as updateDirectives] (ProfilePage_Host.ngfactory.js? [sm]:1)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:23911)
at checkAndUpdateView (core.js:23307)
at callViewAction (core.js:23548)