import { NgModule , ModuleWithProviders } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { AvatarListComponent } from './avatar-list.component' ; import { AvatarListItemComponent } from './avatar-list-item.component' ; const COMPONENTS = [ AvatarListComponent , AvatarListItemComponent ] ; import { NzToolTipModule , NzAvatarModule } from 'ng-zorro-antd' ; const ZORROMODULES = [ NzToolTipModule , NzAvatarModule ] ; @ NgModule ( { imports : [ CommonModule , ... ZORROMODULES ] , declarations : [ ... COMPONENTS ] , exports : [ ... COMPONENTS ] } ) export class AdAvatarListModule { static forRoot ( ) { return { ngModule : AdAvatarListModule , providers : [ ] } ; } }