减少 ionic-2 应用程序的启动时间 [英] Reduce boot time in ionic-2 app
本文介绍了减少 ionic-2 应用程序的启动时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是 ionic-2 项目的新手.我只是想知道如何减少应用程序的启动时间.因为启动画面 3 秒后,它显示白屏,需要 9 秒才能启动.
I am new to ionic-2 project.I just want to know how to reduce boot time of app.Because after 3 sec of splash screen , it shows white screen and takes 9 sec to start.
推荐答案
试着把它放在你的 main.ts
文件的第二行
Try to put this on the second line of your main.ts
file
import { enableProdMode } from '@angular/core';
然后在引导行之前放置
enableProdMode();
在构建时也使用 --prod
所以 ionic build android --prod
also when building use --prod
so ionic build android --prod
这篇关于减少 ionic-2 应用程序的启动时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文