加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Angular应用程序中的空注释

发布时间:2020-12-17 17:51:49 所属栏目:安全 来源:网络整理
导读:是否有任何配置设置可以删除这些空注释和空格? 我的构建命令是ng build –environment prod –progress false –target production和tsconfig是: { "compileOnSave": false,"compilerOptions": { "alwaysStrict": true,"baseUrl": "/","emitDecoratorMetad
是否有任何配置设置可以删除这些空注释和空格?

enter image description here

我的构建命令是ng build –environment prod –progress false –target production和tsconfig是:

{
    "compileOnSave": false,"compilerOptions": {
        "alwaysStrict": true,"baseUrl": "/","emitDecoratorMetadata": true,"experimentalDecorators": true,"forceConsistentCasingInFileNames": true,"lib": [ "es2015","dom" ],"module": "es2015","moduleResolution": "node","newLine": "CRLF","noFallthroughCasesInSwitch": true,"noImplicitAny": true,"noImplicitReturns": true,"noUnusedLocals": true,"noUnusedParameters": false,"outDir": "./dist/out-tsc","removeComments": true,"skipDefaultLibCheck": true,"skipLibCheck": true,"strictNullChecks": true,"target": "es5","typeRoots": [ "./node_modules/@types" ]
    }
}

@ angular / cli:1.0.4
节点:7.2.1
os:win32 x64
@ angular / common:4.1.3

谢谢.

解决方法

这是根据您的Angular指令,标记,条件(如果,…)生成的,因此需要此空白区域.如果你删除它然后它将不会表现良好所有双向绑定将消失.这些空间决定角度DOM将如何呈现并绑定到模型和变量.此注释还会跟踪新DOM元素将呈现的位置(如果条件和其他条件).

有关更多信息,请参阅此链接:https://github.com/angular/angular.js/issues/8722

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读