Based on the NzDrawerService
package, it solves some known issues:
create
this.drawerHelper.create('Edit', FormEditComponent, { i }).subscribe(res => this.load());
// Ok callback
// 1. considered successful
this.NzDrawerRef.close(data);
this.NzDrawerRef.close(true);
// Close
this.NzDrawerRef.close();
this.NzDrawerRef.close(false);
There are includes create
& static
methods to open the normal & static drawer.
Custom component HTML template
Your body content
<div class="drawer-footer">
// The bottom toolbar need wrapped by `drawer-footer`
<button nz-button [nzType]="'default'" (click)="cancel()">
Cancel
</button>
<button nz-button [nzType]="'primary'" (click)="ok()">
OK
</button>
</div>
If you don't bottom toolbar, you need specify footer: false
.