44 */
55
66import { Direction , Directionality } from '@angular/cdk/bidi' ;
7+ import { NgIf , NgSwitch , NgSwitchCase } from '@angular/common' ;
78import {
89 ChangeDetectionStrategy ,
910 ChangeDetectorRef ,
@@ -19,6 +20,13 @@ import {
1920import { Subject } from 'rxjs' ;
2021import { takeUntil } from 'rxjs/operators' ;
2122
23+ import { NzOutletModule } from 'ng-zorro-antd/core/outlet' ;
24+ import { NzIconModule } from 'ng-zorro-antd/icon' ;
25+
26+ import { NzResultNotFoundComponent } from './partial/not-found' ;
27+ import { NzResultServerErrorComponent } from './partial/server-error.component' ;
28+ import { NzResultUnauthorizedComponent } from './partial/unauthorized' ;
29+
2230export type NzResultIconType = 'success' | 'error' | 'info' | 'warning' ;
2331export type NzExceptionStatusType = '404' | '500' | '403' ;
2432export type NzResultStatusType = NzExceptionStatusType | NzResultIconType ;
@@ -82,7 +90,18 @@ const ExceptionStatus = ['404', '500', '403'];
8290 '[class.ant-result-info]' : `nzStatus === 'info'` ,
8391 '[class.ant-result-warning]' : `nzStatus === 'warning'` ,
8492 '[class.ant-result-rtl]' : `dir === 'rtl'`
85- }
93+ } ,
94+ imports : [
95+ NgIf ,
96+ NzOutletModule ,
97+ NzIconModule ,
98+ NgSwitch ,
99+ NzResultNotFoundComponent ,
100+ NzResultServerErrorComponent ,
101+ NzResultUnauthorizedComponent ,
102+ NgSwitchCase
103+ ] ,
104+ standalone : true
86105} )
87106export class NzResultComponent implements OnChanges , OnDestroy , OnInit {
88107 @Input ( ) nzIcon ?: string | TemplateRef < void > ;
0 commit comments