Topic: can not use "mdbSidenav" with slim="true" or [position]="side".. why?

Life.appadmin free asked 3 years ago


When I try to use slim side navbar or when I use the position attribute ide shows this kind of error messages. Why?

(Angular Version = 12) (MdbSidenavModule already imported on app.module.ts)

enter image description here


Arkadiusz Idzikowski staff answered 3 years ago


In v12 Angular is adding more strict tsconfig rules by default. When you use input binding without square brackets, Angular thinks that the passed value is of type string instead of boolean (which is a valid type for this input).

Please change slim="true" to [slim]="true". This rule will also apply to other boolean inputs. We will update the examples in the documentation.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0-beta5
  • Device: Laptop
  • Browser: Chrome
  • OS: Win 10
  • Provided sample code: No
  • Provided link: No