【发布时间】:2018-05-31 15:50:14
【问题描述】:
我正在尝试让我的前端应用程序(Angular5.1.x)运行,但由于模板解析错误而停止:
"let-" is only supported on ng-template elements. ("
</thead>
<tbody>
<template ngFor [ngForOf]="rows" [ERROR ->]let-rowz="$implicit" let- index="index">
<tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].sec"):
ng:///DatepickerModule/DayPickerComponent.html@52:58
at syntaxError (compiler.js:485)
at TemplateParser.parse (compiler.js:24633)
at JitCompiler._parseTemplate (compiler.js:34442)
at JitCompiler._compileTemplate (compiler.js:34417)
at compiler.js:34318
at Set.forEach (<anonymous>)
at JitCompiler._compileComponents (compiler.js:34318)
at compiler.js:34188
at Object.then (compiler.js:474)
at JitCompiler._compileModuleAndComponents (compiler.js:34187)
我想我需要关注这个主题问题,说明我需要使用 ngx-bootrap@ngx-bootstrap@2.0.0-beta.8,但它不适用于那个或 v.2.0.0-rc .0
https://github.com/valor-software/ngx-bootstrap/issues/3024
...任何帮助表示赞赏
【问题讨论】:
-
为什么你不能写 ng-template 而不是 template ?
-
模板已弃用,您应该使用 ng-template。
标签: html angular npm frontend ngx-bootstrap