After testing the app in android , after displaying the splash screen a white blank screen appears for around 2 sec . How to remove this white screen ???
How are you building your app?
Are you using --prod
to create an optimized build?
Also post your ionic info
output please.
No i used --debug
Abd this is my ionic info
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.6.1
System:
Android SDK Tools : 25.2.3
Node : v6.11.2
npm : 3.10.10
OS : Windows 8
Building with the --prod
flag will improve the performance of the app, and in my experience normally removes that 2 second white screen.
this --prod command is showing error
Error: Type FirstPage in C:/ionic/project/src/pages/first/first.ts is part of the declarations of 2 modules: AppModule in C:/
ionic/project/src/app/app.module.ts and FirstPageModule in C:/ionic/project/src/pages/first/first.module.ts! Please cons
ider moving FirstPage in C:/ionic/project/src/pages/first/first.ts to a higher module that imports AppModule in C:/ionic/project/src/app/app.module.ts and FirstPageModule in C:/ionic/project/src/pages/first/first.module.ts. You can also create a
new NgModule that exports and includes FirstPage in C:/ionic/project/src/pages/first/first.ts then import that NgModule in A
ppModule in C:/ionic/project/src/app/app.module.ts and FirstPageModule in C:/ionic/project/src/pages/first/first.module.
ts.
Are you using lazy loading?
If so, go ahead and remove FirstPageModule
from your app.module.ts
file.
Otherwise, go head and remove the first.module.ts
file.
If i remove… will that make any issue… i cant risk it. now or in future
It will only be an “issue” if you decide to do lazy loading later on. However if you look at the file you can see that it’s pretty easy to recreate.
ok i will try this… thanks man
If you’re using the CLI to generate pages (i.e. via ionic g page
) going forward you can pass the --no-module
flag to have it, well, not create a module file.
E.g. ionic generate page Detail --no-module
i tried building with --prod
but the white screen still persists… i tried increasing the splash screen delay…but that too didnt make any change
where you able to resolve this issue?