Skip to content

Commit

Permalink
feat(module:alert): support standalone component (#8182)
Browse files Browse the repository at this point in the history
* feat(module:alert): support standalone component

* feat(module:alert): support standalone component
  • Loading branch information
evgeniyefimov authored Dec 5, 2023
1 parent 4673926 commit 167bed0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 5 additions & 0 deletions components/alert/alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

import { Direction, Directionality } from '@angular/cdk/bidi';
import { NgIf } from '@angular/common';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Expand All @@ -24,15 +25,19 @@ import { takeUntil } from 'rxjs/operators';

import { slideAlertMotion } from 'ng-zorro-antd/core/animation';
import { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
import { BooleanInput } from 'ng-zorro-antd/core/types';
import { InputBoolean } from 'ng-zorro-antd/core/util';
import { NzIconModule } from 'ng-zorro-antd/icon';

const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'alert';

@Component({
selector: 'nz-alert',
exportAs: 'nzAlert',
animations: [slideAlertMotion],
standalone: true,
imports: [NgIf, NzIconModule, NzOutletModule],
template: `
<div
*ngIf="!closed"
Expand Down
8 changes: 1 addition & 7 deletions components/alert/alert.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

import { BidiModule } from '@angular/cdk/bidi';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
import { NzIconModule } from 'ng-zorro-antd/icon';

import { NzAlertComponent } from './alert.component';

@NgModule({
declarations: [NzAlertComponent],
exports: [NzAlertComponent],
imports: [BidiModule, CommonModule, NzIconModule, NzOutletModule]
imports: [NzAlertComponent]
})
export class NzAlertModule {}
2 changes: 1 addition & 1 deletion components/alert/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { NzAlertModule } from 'ng-zorro-antd/alert';

## API

### nz-alert
### nz-alert:standalone

| Property | Description | Type | Default | Global Config |
| -------- | ----------- | ---- | ------- | ------------- |
Expand Down
2 changes: 1 addition & 1 deletion components/alert/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { NzAlertModule } from 'ng-zorro-antd/alert';

## API

### nz-alert
### nz-alert:standalone

| 参数 | 说明 | 类型 | 默认值 | 全局配置 |
| --- | --- | --- | --- | --- |
Expand Down

0 comments on commit 167bed0

Please sign in to comment.