Topic: DatepickerModule Error with MDB Angular 5.0.5 Pro

St Clair Clarke pro asked 7 years ago


Hi,

I updated my app to mdb-angular-pro-5.0.5 and typescript 2.6.1

ng serve command compiles the app without any errors, but in the chrome dev console I get the following error

Uncaught Error: Template parse errors:
"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:37
"let-" is only supported on ng-template elements. ("
 </thead>
 <tbody>
 <template ngFor [ngForOf]="rows" let-rowz="$implicit" [ERROR ->]let-index="index">
 <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].sec"): ng:///DatepickerModule/DayPickerComponent.html@52:58
 at syntaxError (compiler.js:466)
 at TemplateParser.parse (compiler.js:24329)
 at JitCompiler._parseTemplate (compiler.js:33716)
 at JitCompiler._compileTemplate (compiler.js:33691)
 at eval (compiler.js:33593)
 at Set.forEach (<anonymous>)
 at JitCompiler._compileComponents (compiler.js:33593)
 at eval (compiler.js:33463)
 at Object.then (compiler.js:455)
 at JitCompiler._compileModuleAndComponents (compiler.js:33462)
syntaxError @ compiler.js:466
TemplateParser.parse @ compiler.js:24329
JitCompiler._parseTemplate @ compiler.js:33716
JitCompiler._compileTemplate @ compiler.js:33691
(anonymous) @ compiler.js:33593
JitCompiler._compileComponents @ compiler.js:33593
(anonymous) @ compiler.js:33463
then @ compiler.js:455
JitCompiler._compileModuleAndComponents @ compiler.js:33462
JitCompiler.compileModuleAsync @ compiler.js:33378
CompilerImpl.compileModuleAsync @ platform-browser-dynamic.js:230
PlatformRef.bootstrapModule @ core.js:5446
(anonymous) @ main.ts:44
../../../../../src/main.ts @ main.bundle.js:4574
__webpack_require__ @ inline.bundle.js:55
0 @ main.bundle.js:4589
__webpack_require__ @ inline.bundle.js:55
webpackJsonpCallback @ inline.bundle.js:26
(anonymous) @ main.bundle.js:1

The application does not run as expected. No UI is seen


Dawid Adach pro commented 7 years ago

Could you please share your source code? This doesn't look like an issue with the DatePicker component itself but custom template implementation.

St Clair Clarke pro commented 7 years ago

I trace the problem to ngx-bootstrap: I will sort it out there. Thanks for your help though. Cheers


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags