Skip to content

Commit 24d0664

Browse files
authored
fix(module:drawer): drawer not open (#8120)
Drawer don't open in a lazyload module refactor(module:drawer): remove useless DrawerServiceModule
1 parent 3209d74 commit 24d0664

4 files changed

Lines changed: 7 additions & 25 deletions

File tree

‎components/drawer/drawer.module.ts‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,11 @@ import { NzIconModule } from 'ng-zorro-antd/icon';
1515

1616
import { NzDrawerContentDirective } from './drawer-content.directive';
1717
import { NzDrawerComponent } from './drawer.component';
18-
import { NzDrawerServiceModule } from './drawer.service.module';
18+
import { NzDrawerService } from './drawer.service';
1919

2020
@NgModule({
21-
imports: [
22-
BidiModule,
23-
CommonModule,
24-
OverlayModule,
25-
PortalModule,
26-
NzIconModule,
27-
NzOutletModule,
28-
NzNoAnimationModule,
29-
NzDrawerServiceModule
30-
],
21+
imports: [BidiModule, CommonModule, OverlayModule, PortalModule, NzIconModule, NzOutletModule, NzNoAnimationModule],
22+
providers: [NzDrawerService],
3123
exports: [NzDrawerComponent, NzDrawerContentDirective],
3224
declarations: [NzDrawerComponent, NzDrawerContentDirective]
3325
})

‎components/drawer/drawer.service.module.ts‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎components/drawer/drawer.service.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class DrawerBuilderForService<T extends {}, R> {
6060
}
6161
}
6262

63-
@Injectable({ providedIn: 'root' })
63+
@Injectable()
6464
export class NzDrawerService {
6565
constructor(private overlay: Overlay) {}
6666

‎components/drawer/public-api.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
44
*/
55

6-
export * from './drawer.component';
76
export * from './drawer-content.directive';
8-
export * from './drawer.module';
9-
export * from './drawer.service';
10-
export * from './drawer.service.module';
117
export * from './drawer-options';
128
export * from './drawer-ref';
9+
export * from './drawer.component';
10+
export * from './drawer.module';
11+
export * from './drawer.service';

0 commit comments

Comments
 (0)