Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Importing in feature modules

qiaozy free asked 5 years ago


https://mdbootstrap.com/docs/angular/getting-started/importing-modules/, this page only states to import MDBBootstrapModulesPro.forRoot() in app module. How about other modules in the same project? Do I need to import MDBBootstrapModulesPro.forRoot() in every module I have?


Arkadiusz Idzikowski staff answered 5 years ago


It depends on the configuration of your modules. You don't need to load MDBBootstrapModulesPro (which contain every MDB module) if you don't need to use all components in your specific module.

You can find list of all modules here:

https://mdbootstrap.com/docs/angular/getting-started/modules/


qiaozy free commented 5 years ago

For example, https://angular.io/guide/feature-modules, if I want to use all mdb features in both CustomerDashboard and main app module, do I need to import MDBBootstrapModulesPro.forRoot() in both modules?


Arkadiusz Idzikowski staff commented 5 years ago

If your feature module doesn't use lazy loading then you can import MDB modules only in your root module.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.0.0
  • Device: laptop
  • Browser: chrome
  • OS: win
  • Provided sample code: No
  • Provided link: Yes