Skip to content

Commit cc52555

Browse files
authored
fix(module:badge): NG0955 warning in nz-badge-sup component (#8858)
1 parent d28876c commit cc52555

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

components/badge/badge-sup.component.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import {
77
ChangeDetectionStrategy,
88
Component,
99
Input,
10+
numberAttribute,
1011
OnChanges,
1112
OnInit,
1213
SimpleChanges,
1314
TemplateRef,
14-
ViewEncapsulation,
15-
numberAttribute
15+
ViewEncapsulation
1616
} from '@angular/core';
1717

1818
import { zoomBadgeMotion } from 'ng-zorro-antd/core/animation';
@@ -81,7 +81,10 @@ export class NzBadgeSupComponent implements OnInit, OnChanges {
8181
constructor() {}
8282

8383
generateMaxNumberArray(): void {
84-
this.maxNumberArray = this.nzOverflowCount.toString().split('');
84+
this.maxNumberArray = this.nzOverflowCount
85+
.toString()
86+
.split('')
87+
.map((value: string, index: number) => `${value}-${index}`);
8588
}
8689

8790
ngOnInit(): void {

0 commit comments

Comments
 (0)