TypeScript中的代码在本地工作,但在生产中不能工作。

问题描述 投票:0回答:1
<div>
  <div style="text-align:center">
    <button class="btnClass">{{ submitButtonCaption }}</button>
    <button type="button" style="margin-left:15px;" class="cancelButton" (click)="clearSearch()">
      {{ clearButtonCaption }}
    </button>
  </div>
</div>

本地系统中这段代码工作正常,但在服务器中显示如下。

<div>
    <!--bindings={    
    "ng-reflect-ng-if": "false"    
    }-->​
</div>

Angular 7项目:所以在TypeScript文件中 @component 在模板部分内联,我在``操作员之间写了这段代码。

html angular typescript dom angular-ng-if
1个回答
0
投票

你有一些*ngIf指令,解析为false。如果没有整段代码来审查,我无法判断更多。

© www.soinside.com 2019 - 2024. All rights reserved.