@jhonycage wrote:
we are building a progressive web app, when building the app for browser or mobile, some weird frame that seems to fail loading an image at first, bu then after a while it renders, I don’t know if it has to be with the splash screen that shows on mobile. The problem seems also to be related with the loading controller, after one second or show it just renders what is supposed to.
has anyone experienced something like this?
this is how I am using the loading controller
constructor( public navCtrl: NavController, public navParams: NavParams, private productsPvd: ProductsProvider, private bdbInMemoryProvider: BdbInMemoryProvider, private loadingCtrl: LoadingController ) { this.getProducts(); } private getProducts() { let loading = this.loadingCtrl.create({ content: '' }); const storageType = new StorageType(true, false); loading.present().then(() => { this.productsPvd.getProducts(this.bdbInMemoryProvider.getItemByKey(InMemoryKeys.IdentificationNumber, storageType)) .subscribe( data => { const acctBalancesList = data; this.bdbInMemoryProvider.setItemByKey(InMemoryKeys.AcctBalancesList, acctBalancesList); var firstTransaction = acctBalancesList[0]; if (firstTransaction !== undefined) { this.bdbInMemoryProvider.setItemByKey(InMemoryKeys.FirstTransactionOfProducts, firstTransaction); } this.navCtrl.setRoot('DashboardPage'); loading.dismiss(); }, err => { this.errorMsg = 'La cédula ingresada no se encuentra registrada'; console.log(err) loading.dismiss(); }); }); }
Posts: 1
Participants: 1