Skip to content

Commit

Permalink
refactor(module:pipe): deprecated nz-safe-null pipe (#8026)
Browse files Browse the repository at this point in the history
  • Loading branch information
HyperLife1119 authored Nov 14, 2023
1 parent 0a312e3 commit d14869e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/pipes/demo/safe-null.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ title:

转换 Null 和 Undefined 为指定字符串

警告:在 `v17.0.0` 中被弃用,请使用空置合并运算符(??)替代,例如:

```
{{ value ?? '-' }}
```

## en-US

Convert Null and Undefined to the specified string

WARNING: Deprecated in `v17.0.0`, please use the nullish coalescing operator (??) instead, eg:

```
{{ value ?? '-' }}
```
3 changes: 3 additions & 0 deletions components/pipes/nz-safe-null.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { Pipe, PipeTransform } from '@angular/core';

import { isNil } from 'ng-zorro-antd/core/util';

/**
* @deprecated v17.0.0 - Use Nullish coalescing operator (??) instead of `NzSafeNullPipe`.
*/
@Pipe({
name: 'nzSafeNull'
})
Expand Down

0 comments on commit d14869e

Please sign in to comment.