Runtime Issues
空白应用
备注
我的应用中没有错误,为什么显示空白屏幕?
这种情况可能有多种不同的原因。如果你在Ionic论坛上找不到解决方案,请确保:
- 没有为旧版浏览器/Android版本包含polyfills
对于使用 @angular/cli@7.3 或更高版本的项目,polyfills会自动包含。对于在此之前创建的项目,需要手动启用polyfills。
在 src/polyfills.ts 中,你必须启用所有ES6 polyfills以支持Android 4.4。
或者,可以将项目更新为使用最新版本的 @angular/cli 包和 @angular-devkit 包,并在 angular.json 的构建选项对象中包含 es5BrowserSupport 选项:
"input": "src/global.scss"
}
],
- "scripts": []
+ "scripts": [],
+ "es5BrowserSupport": true
},
"configurations": {
"production": {
这将自动为需要polyfills的旧版浏览器包含polyfills。