import { NgModule , ModuleWithProviders } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { RouterModule } from '@angular/router' ; import { ProHeaderComponent } from './pro-header.component' ; const COMPONENTS = [ ProHeaderComponent ] ; import { NzBreadCrumbModule } from 'ng-zorro-antd' ; const ZORROMODULES = [ NzBreadCrumbModule ] ; @ NgModule ( { imports : [ CommonModule , RouterModule , ... ZORROMODULES ] , declarations : [ ... COMPONENTS ] , exports : [ ... COMPONENTS ] } ) export class AdProHeaderModule { static forRoot ( ) { return { ngModule : AdProHeaderModule } ; } }