diff --git a/components/drawer/drawer.module.ts b/components/drawer/drawer.module.ts index 9ffbf6d50a..69b225fa6e 100644 --- a/components/drawer/drawer.module.ts +++ b/components/drawer/drawer.module.ts @@ -15,19 +15,11 @@ import { NzIconModule } from 'ng-zorro-antd/icon'; import { NzDrawerContentDirective } from './drawer-content.directive'; import { NzDrawerComponent } from './drawer.component'; -import { NzDrawerServiceModule } from './drawer.service.module'; +import { NzDrawerService } from './drawer.service'; @NgModule({ - imports: [ - BidiModule, - CommonModule, - OverlayModule, - PortalModule, - NzIconModule, - NzOutletModule, - NzNoAnimationModule, - NzDrawerServiceModule - ], + imports: [BidiModule, CommonModule, OverlayModule, PortalModule, NzIconModule, NzOutletModule, NzNoAnimationModule], + providers: [NzDrawerService], exports: [NzDrawerComponent, NzDrawerContentDirective], declarations: [NzDrawerComponent, NzDrawerContentDirective] }) diff --git a/components/drawer/drawer.service.module.ts b/components/drawer/drawer.service.module.ts deleted file mode 100644 index 20a4b9d089..0000000000 --- a/components/drawer/drawer.service.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE - */ - -import { NgModule } from '@angular/core'; - -@NgModule() -export class NzDrawerServiceModule {} diff --git a/components/drawer/drawer.service.ts b/components/drawer/drawer.service.ts index f9fcd5d0bb..abe5962b22 100644 --- a/components/drawer/drawer.service.ts +++ b/components/drawer/drawer.service.ts @@ -60,7 +60,7 @@ export class DrawerBuilderForService { } } -@Injectable({ providedIn: 'root' }) +@Injectable() export class NzDrawerService { constructor(private overlay: Overlay) {} diff --git a/components/drawer/public-api.ts b/components/drawer/public-api.ts index b53e34f905..0deeb04706 100644 --- a/components/drawer/public-api.ts +++ b/components/drawer/public-api.ts @@ -3,10 +3,9 @@ * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ -export * from './drawer.component'; export * from './drawer-content.directive'; -export * from './drawer.module'; -export * from './drawer.service'; -export * from './drawer.service.module'; export * from './drawer-options'; export * from './drawer-ref'; +export * from './drawer.component'; +export * from './drawer.module'; +export * from './drawer.service';