Question · Angular course · Module 3: Modules

Exporting in SharedModule

Why does SharedModule often also export CommonModule?

Answer options

  • So that modules importing SharedModule have directives like ngIf without a separate import
  • Because CommonModule is required in bootstrap
  • To register global singleton services
  • Because without it the application will not compile

You can check the correct answer by solving this task in the CodeWorlds game.