From cc5255587edae6731d38f39786c701679c50020b Mon Sep 17 00:00:00 2001 From: Nicolas Frizzarin Date: Thu, 7 Nov 2024 16:15:27 +0100 Subject: [PATCH] fix(module:badge): NG0955 warning in nz-badge-sup component (#8858) --- components/badge/badge-sup.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/badge/badge-sup.component.ts b/components/badge/badge-sup.component.ts index f63cd1a37f1..35f60970131 100644 --- a/components/badge/badge-sup.component.ts +++ b/components/badge/badge-sup.component.ts @@ -7,12 +7,12 @@ import { ChangeDetectionStrategy, Component, Input, + numberAttribute, OnChanges, OnInit, SimpleChanges, TemplateRef, - ViewEncapsulation, - numberAttribute + ViewEncapsulation } from '@angular/core'; import { zoomBadgeMotion } from 'ng-zorro-antd/core/animation'; @@ -81,7 +81,10 @@ export class NzBadgeSupComponent implements OnInit, OnChanges { constructor() {} generateMaxNumberArray(): void { - this.maxNumberArray = this.nzOverflowCount.toString().split(''); + this.maxNumberArray = this.nzOverflowCount + .toString() + .split('') + .map((value: string, index: number) => `${value}-${index}`); } ngOnInit(): void {