gpt4 book ai didi

angular - 如何修复 Angular 11 'Option "进度”已被弃用?

转载 作者:行者123 更新时间:2023-12-04 12:35:57 25 4
gpt4 key购买 nike

关闭。这个问题需要debugging details .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

11 个月前关闭。




Improve this question




我在编译 Angular 11 时缺少百分比进度 View 。通常我这样做:ng serve并在编译代码时看到了百分比的进步。现在百分比 View 消失了,它写的是 progress已弃用:

Option "progress" is deprecated: Use the "progress" option in the browser builder instead.


现在的问题是:这是什么意思或我必须将 progress=true 放在哪里现在选择取回百分比 View ?

最佳答案

来自 ng serve 的文档, it states那个--progress=true|false不再使用(或移动),因为您收到错误消息。

Deprecated: Use the "progress" option in the browser builder instead.


需要做的是,您的 angular.json文件需要更新才能再次显示百分比。 Derived from a default StackBlitz Angular setup ,它应该是这样的:
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/demo",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"progress": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
},
}
哪里 "progress": true,已添加到 options目的。在 StackBlitz 上很难测试,所以请在本地尝试。

关于angular - 如何修复 Angular 11 'Option "进度”已被弃用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64952613/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com