Ionic 4: “Loading Controller” dismiss() is called before present() which will keep spinner without dismissing

this is how I solved my issue.. I used a boolean variable “isLoading” to change to false when dismiss() is called. after present() is finished if “isLoading” === false (means dismiss() already called) then it will dismiss immediately. also, I wrote the code in a service so I don’t have to write it again in … Read more

Ionic 5 – How to replace default icon and splash screen image and generate resources

Automatic icon and splash screen resizing CLI tool for Capacitor based applications. It automatically resizes and copies your icon.png and splash.png files to platform dedicated directories. It does NOT require any external binary libraries. Javascript only. Installation $ npm install capacitor-resources -g Usage Required files Add your icon.png (1024×1024 px) and splash.png (2732×2732 px) files … Read more

Ionic 4 custom components

Finally figured this out, here’s a repro that works: ionic start myProject blank –type=angular ionic g module components ionic g component components/myComponent –export This adds both a declaration and export to the components module for “myComponent”. To use the component just add ComponentsModule to your imports in your page module, e.g. @NgModule({ imports: [ CommonModule, … Read more

Ionic 5 with Angular 9 – Angular JIT compilation failed: ‘@angular/compiler’ not loaded

Updated & correct solution to fix this Based on the answer from Tran Quang, I went to see the CHANGELOG.md of ionic-native and came to know that they recently updated their package to compile with Angular 9. Hence you need to update any/all dependencies of @ionic-native. For this, look at all the dependencies in your … Read more

how to check app running in foreground or background in ionic/cordova/phonegap

Use the two Events “Pause” and “Resume“. You will find all Events here in the Apache Cordova Events Documentation. Event – Pause: The pause event fires when the native platform puts the application into the background, typically when the user switches to a different application. Event – Resume The resume event fires when the native … Read more