我正在使用 ionic 2、angular 2 和 typescript 构建应用程序.
I am building a app using ionic 2, angular 2 and typescript.
目前,已发布的应用程序(IOS 和 Android)在移动设备上的启动时间非常缓慢.
Currently, the released application(IOS & Android) boot up time very slow at the mobile devices.
即使是带有一些UI的启动模板在iPhone 6上也需要加载5秒,在oneplus 3上需要6秒.这个速度太慢了,不能接受.我的应用程序更复杂,需要大约 10 秒才能启动到首页.
Even the start template with some UI need to load 5 seconds at iPhone 6, 6 second on oneplus 3. This speed too slow and can't accept. My app is more complicated that takes like 10 second to boot to a front page.
我的启动应用程序的代码.
My code to start the app.
ionic start test --v2 --ts
启动时间能否提高到可接受的水平?
Can the boot time improved to a acceptable level?
Ionic 2 new RC4 改变了构建过程.现在可以使用 AoT 构建应用
Ionic 2 new RC4 changed the building process. Now app can be built with AoT using
ionic run android --prod
有关更多信息,请查看 ionic
For more info check out this issue on ionic
编辑
Ionic-cli 3 进一步模块化,cordova 命令需要ionic cordova.所以你需要像这样运行它
Ionic-cli 3 further modularize it and cordova commands needs ionic cordova. so you need to run it like
ionic cordova run android --prod
这篇关于Ionic 2 构建的应用程序(IOS、Android)在启动时很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
出现键盘时如何在iOS上调整UITextView的大小?How to resize UITextView on iOS when a keyboard appears?(出现键盘时如何在iOS上调整UITextView的大小?)
如何可靠地检测 iOS 9 上是否连接了外部键盘?How to reliably detect if an external keyboard is connected on iOS 9?(如何可靠地检测 iOS 9 上是否连接了外部键盘?)
如何在 iOS 7 上模拟键盘动画以添加“完成"数How to mimic Keyboard animation on iOS 7 to add quot;Donequot; button to numeric keyboard?(如何在 iOS 7 上模拟键盘动画以添加“完成数字键
如何关闭 iOS 键盘?How do I dismiss the iOS keyboard?(如何关闭 iOS 键盘?)
是否可以在 ios 越狱后使用外部键盘模拟触摸事件Is possible to simulate touch event using an external keyboard on ios jailbroken?(是否可以在 ios 越狱后使用外部键盘模拟触摸事件?)
Android 上的数字软键盘Numeric Soft Keyboard on Android(Android 上的数字软键盘)