Angular应用在iPhone和某些设备上无法运行而且没有错误。
创始人
2024-10-30 16:00:31
0

这个问题可能是因为iPhone和一些设备不支持ES5。Angular默认编译器是使用ES5编译器,因此解决方法是使用ES6编译器。在angular.json文件中,修改“target”属性为“es2015”,示例如下:

"build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/my-app", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ "src/styles.css" ], "scripts": [] }, "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "3mb", "maximumError": "5mb" } ] } }, "defaultConfiguration": "production", "target": "es2015" // 修改 "es5" 为 "es2015" }

相关内容

热门资讯

透视总结!菠萝辅助器免费版的功... 透视总结!菠萝辅助器免费版的功能介绍,智星菠萝辅助(真是是真的有挂)1、进入到菠萝辅助器免费版的功能...
透视模拟器!aapoker辅助... 透视模拟器!aapoker辅助插件工具(透视)透视插件(原来存在有挂)1)aapoker辅助插件工具...
透视软件!aapoker辅助器... 透视软件!aapoker辅助器怎么用(透视)辅助(原来有挂)1、aapoker辅助器怎么用ai机器人...
透视中牌率!哈糖大菠萝有没有挂... 透视中牌率!哈糖大菠萝有没有挂,sohoo开挂辅助(好像真的有挂)1、哈糖大菠萝有没有挂系统规律教程...
透视脚本!aapoker脚本怎... 透视脚本!aapoker脚本怎么用(透视)发牌逻辑(竟然是有挂)运aapoker脚本怎么用辅助工具,...
透视中牌率!智星菠萝有挂吗,约... 透视中牌率!智星菠萝有挂吗,约局吧辅助器(原来真的有挂)智星菠萝有挂吗辅助器中分为三种模型:智星菠萝...
透视能赢!aapoker脚本(... 透视能赢!aapoker脚本(透视)透视软件(其实是有挂)1、每一步都需要思考,不同水平的挑战会更加...
透视脚本!newpoker脚本... 透视脚本!newpoker脚本,约局吧德州可以透视吗(确实是有挂);1、很好的工具软件,可以解锁游戏...
透视科技!aapoker俱乐部... 透视科技!aapoker俱乐部靠谱吗(透视)脚本(果然真的是有挂);aapoker俱乐部靠谱吗辅助器...
透视教程!xpoker辅助神器... 透视教程!xpoker辅助神器,pokemmo辅助器(确实存在有挂);1、xpoker辅助神器透视辅...