0

If we import material modules like this:

import * as material from '@angular/material';
let materialModules = [material.MatBadgeModule];

Now we would use the materialModules array for our shared material module import / export declarations.

If we do it like this will Angular import all material modules with the application, or will it only include the ones that are declared in NgModules import and export declarations?

  • 1
    Keep in mind that in Angular Material 8 Importing directly from the root @angular/material entry-point is deprecated. – fridoo Aug 13 at 14:56
  • Good to know - Thanks! – Ole Aug 13 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.