找不到“烟斗”编号

时间:2019-05-13 14:19:27

标签: angular angular7

我刚刚将我的应用程序从4角迁移到7角,一切正常,但是当需要编译(ng build --prod)时,出现此错误:

ERROR in : Template parse errors:
The pipe 'number' could not be found ("
      </div>
      <div class="col-2">
        {{ listing.currency.abbreviation[ERROR ->]() }}{{ totalCreditRequest() | number : '1.0-1' }}
        <span class="status-badge {{ claims[claims"): /Users/../claims/claims.component.html@50:40
The pipe 'number' could not be found ("m.itemLot.grade }}</td>
            <td class="text-center">{{ listing.currency.abbreviation() }}{{ [ERROR ->]claim.outcomeValue | number : '1.0-1' }}</td>
            <td class="text-center">{{ claim.issue.name"): /Users/../claims/claims.component.html@82:76

更新

我发现它不是由于这个原因而编译的,有人可以向我解释常春藤的工作原理以及为什么它不编译吗?我将其更改为false,现在可以使用。

"angularCompilerOptions": {
  "enableIvy": true
}

2 个答案:

答案 0 :(得分:0)

您必须导入CommonModule,它涵盖了DecimalPipe

https://angular.io/api/common/CommonModule

/*Check how many sentences should be printed*/

答案 1 :(得分:0)

如果您启用了该功能,将无法正常工作

“ angularCompilerOptions”:{   “ enableIvy”:假 }

相关问题