mdbTable and strictTemplates


Topic: mdbTable and strictTemplates

ammi pro asked 4 years ago

on my html I have table mdbTable small="true" it works fine if strictTemplates is false. If I switch it to true, I see an error "Type 'string' is not assignable to type 'boolean'. ngtsc(2322) ". Please help. How can I fix it?

Angular 10.2.4 tsconfig.json

"angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictTemplates": true, "strictInjectionParameters": true }

Thank you


Arkadiusz Idzikowski staff answered 4 years ago

@ammi In this case you should use syntax with square brackets to make sure that the value passed to the input is of type boolean.

[small]="true"


FREE CONSULTATION

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

Status

Closed

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 10.1.1
  • Device: Dell
  • Browser: Chrome 89.0.4389.114
  • OS: Win 10.0.18363
  • Provided sample code: No
  • Provided link: No
Tags