hi
i have a login sytem and a list of datas (basic : date and title) with firebase
One page : account , on open i have a provider and get account infos
Second page : display list of items, on open a provider request to get list and display it
it work but i have a delay between the request and the display
to remove this i want a provider, just after login with a ini fonction get account data and list data
After login i call iniProfile() inside my DataserviceProvider
in DataserviceProvider
public account : Account; (Account is a interface)
iniProfile(){
let data = this.userProvider.getInfos().subscribe((snapshot)=>{
let infos = snapshot.val();
this.account = {
fullname : infos.fullname,
email : this.currentUser.email,
…
};
})
this.userProvider.getInfos() : it’s another provider dedicate to account information
in account page
import { Account } from ‘…/…/providers/user/iaccount’;
import { DataserviceProvider } from ‘…/…/providers/dataservice/dataservice’;
…
export class AccountPage {
@Input() account: Account;
console.log(this.account) => undefined
thanks for your help