mdb-icon is not a known element


Topic: mdb-icon is not a known element

allancmello pro asked 6 years ago

Uncaught Error: Template parse errors:

mdb-icon' is not a known element:

  1. If 'mdb-icon' is an Angular component, then verify that it is part of this module.
  2. If 'mdb-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

<!--Card Data--> <div class="admin-up">[ERROR ->]<mdb-icon fas icon="money-bill-alt" class="primary-color"></mdb-icon><div class="): ng:///DashboardsModule/AdminComponent.html@13:20

Whats a problem?

PS: The code that shows this error was copied from the Admin Dashboard example


Arkadiusz Idzikowski staff answered 6 years ago

Please make sure to add IconsModule.forRoot() to your DashboardModule imports.


allancmello pro commented 6 years ago

Hi Arkadiusz,

This error message show after add IconsModule.forRoot() in my DashboardModule imports:

ng\_uikit\_pro\_standard\_\_WEBPACK\_IMPORTED\_MODULE\_9\_\_.IconsModule.forRoot is not a function

My imports:

import { MDBSpinningPreloader, MDBBootstrapModulesPro, ToastModule, IconsModule } from 'ng-uikit-pro-standard';

imports: \[ BrowserModule, DashboardsModule, AppRoutingModule, BrowserAnimationsModule, FormsModule, HttpClientModule, ReactiveFormsModule, ToastModule.forRoot(), MDBBootstrapModulesPro.forRoot(), IconsModule.forRoot()...

VS Code warning for this function forRoot() doesn´t exist in IconsModule.

This is very strange. I search in the AdminDasboard example of the MDB Angular Pro by IconsModule, and it is not declared in any module. And there is no declaration in any import of the AdminDashboard sample modules the IconsModule module.

In which library is mdb-icon really set?


allancmello pro commented 6 years ago

It´s work for IconsModule, not IconsModule.forRoot().

Thanks Arkadiusz


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: 7.4.3
  • Device: All
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No