在Angular 6中从控制台隐藏IE警告 [英] Hide IE warnings from console in Angular 6
本文介绍了在Angular 6中从控制台隐藏IE警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在提供我的角度应用程序时,我会不断收到这些警告:
I am constantly getting these warnings when serving my angular app:
例如:
./src/app/core/containers/navbar/navbar.component.sass
(Emitted value instead of an instance of Error) autoprefixer: ...src\app\core\containers\navbar\navbar.component.sass:11:4: grid-auto-columns is not supported by IE
不幸的是,我对IE支持不感兴趣.是否可以禁用此类警告?
Unfortunately, I am not interested in IE support. Is it possible to disable this type of warnings?
推荐答案
您可以在CSS文件中的行前添加以下警告来禁用警告:
You can disable warnings for single lines in your CSS file by prepending the line with:
/* autoprefixer: off */
例如,IE不支持CSS设置 grid-auto-rows
.要禁用该警告,请按以下步骤应用它:
For example, IE does not support the CSS setting grid-auto-rows
. To disable the warning, apply it like this:
.some-div {
display: grid;
/* autoprefixer: off */
grid-auto-rows: auto auto;
}
来源: https://github.com/angular/angular-cli/issues/5964
这篇关于在Angular 6中从控制台隐藏IE警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文