Can't Import CardsModule - 'mdb-card-img' is not a known ele


Topic: Can't Import CardsModule - 'mdb-card-img' is not a known element

maenthoven pro asked 6 years ago

Prepping a site for production deployment and realized that we can't import just the cards module.

Cards work when using the entire package, but not when only using the CardsModule.

Tested with a fresh project, still broken.

Steps:

1. Follow "Quick Start Installation" exactly

2. Import CardsModule.forRoot()

3. Copy Sample code from top of Cards Page

4. Run app, see error

Github Link (make sure to place your key in package.json): https://github.com/maenthoven/CardsBrokenProject

'mdb-card-img' is not a known element:
1. If 'mdb-card-img' is an Angular component, then verify that it is part of this module.
2. If 'mdb-card-img' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("

Damian Gemza staff answered 6 years ago

Dear @maenthoven 

You have used the wrong module.

CardsModule is a module for Pro version of cards - Flipping Cards, Card Reveal and similar.

The mdb-card-img component is contained in CardsFreeModule. Please import it instead of CardsModule, and everything will be okay.

This is described in our API section of Cards Documentation.

Best Regards,

Damian


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
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: Yes
  • Provided link: No