Topic: 'mdb-navbar' is not a known element:
patricio.ortiz@daltum.mx free asked 4 years ago
I have 'mdb-navbar' is not a known element error, I can use the mdbDropdown and the db-carousel, but the mdb-navbar is giving me an error... I have: app.module.ts import { MDBSpinningPreloader, MDBBootstrapModulesPro, ToastModule } from 'ng-uikit-pro-standard'; angular.json: "styles": [ "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss", "node_modules/@fortawesome/fontawesome-free/scss/solid.scss", "node_modules/@fortawesome/fontawesome-free/scss/regular.scss", "node_modules/@fortawesome/fontawesome-free/scss/brands.scss", "node_modules/ng-uikit-pro-standard/assets/scss/bootstrap/bootstrap.scss", "node_modules/ng-uikit-pro-standard/assets/scss/mdb.scss", "node_modules/@angular/material/prebuilt-themes/indigo-pink.css", //"node_modules/bootstrap/dist/css/bootstrap.min.css", "src/styles.css" ], "scripts": [ //"node_modules/jquery/dist/jquery.min.js", "node_modules/chart.js/dist/Chart.js", "node_modules/easy-pie-chart/dist/easypiechart.js", "node_modules/screenfull/dist/screenfull.js", "node_modules/hammerjs/hammer.min.js" ]
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 9.3.0
- Device: Computer
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 4 years ago
Is the component in which you try to use
mdb-navbar
declared in theapp.module
? Do you use lazy loading?patricio.ortiz@daltum.mx free commented 4 years ago
I declared... do I need to declare each one? I was assuming that MDBBootstrapModulesPro had every component...
import { MDBSpinningPreloader, MDBBootstrapModulesPro, ToastModule } from 'ng-uikit-pro-standard';
I also having issues when I publish, in my dev enviroment I have no problems, but when I publish I got this in the browser console and everything stops working:
DevTools failed to load SourceMap: Could not parse content for https://daltumrest.azurewebsites.net/hammer.min.js.map: Unexpected token < in JSON at position 0 bootstrap:79 Uncaught TypeError: Cannot read property 'call' of undefined at webpack_require (bootstrap:79) at Module../src/app/app.module.ts (app.component.ts:12) at webpack_require (bootstrap:79) at Module../src/main.ts (environment.ts:15) at webpack_require (bootstrap:79) at Object.0 (main.ts:21) at webpack_require (bootstrap:79) at checkDeferredModules (bootstrap:45) at Array.webpackJsonpCallback [as push] (bootstrap:32) at main-es2015.js:1
Arkadiusz Idzikowski staff commented 4 years ago
MDBBootstrapModulesPro contain all MDB modules. I'm asking if the component in which you use
<mdb-navbar>
code is in the app.module declarations array. If you use lazy loaded modules in your app you need to import MDB modules in every lazy loaded module.As for the problem with deployment, please create new thread on the support forum and provide more details.