Skip to content

Creating Modules

Charles Alleman edited this page Jan 10, 2020 · 1 revision

Modules

Angular modules are a group of angular datatypes such as services, pipes, components, etc. They can be used to hide angular dataypes from the rest of the application, or reduce the number of imports required by the SharedModule/AppModule. To create a module the following template may help you:

<name>.module.ts

@NgModule({
  declarations: [
    <module components>
  ],
  imports: [CommonModule, RouterModule, NgbModule, FontAwesomeModule, SharedModule?],
  exports: [
    <module components accessible by SharedModule/AppModule components>
  ]
})
export class <name>Module {
  constructor() {
    fontAwesomeLibraries(library);
  }
}
Clone this wiki locally