作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
关闭。这个问题需要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/
我是一名优秀的程序员,十分优秀!