Skip to content

Generate a Module

Abhay Chawla edited this page Jul 27, 2018 · 3 revisions

Follow the following steps to generate a new module with routing: (for a new section of the application)

  1. Open the terminal and run the command: ng generate module module-name --routing

  2. Navigate to the project's app.module.ts:

  • import the module import { ModuleName } from './module-path.module'

  • declare the module in imports array making sure to mention it above the AppRoutingModule @NgModule({ imports: [ ModuleName ]})

  1. Import the CoreModule and declare it in the imports array of the newly created module to ensure that AngularMaterial components and FlexLayout directives can be used within the components:
import { CoreModule } from '../core/core.module';
@NgModule({  imports: [ CoreModule ]})

Demo Credentials:

Username: mifos

Password: password

Clone this wiki locally