File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
projects/igniteui-angular/src/lib/badge Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ export class IgxBadgeComponent {
8787 * ```
8888 */
8989 @Input ( )
90- public value = '' ;
90+ public value : string | number = '' ;
9191
9292 /**
9393 * Sets/gets an icon for the badge from the material icons set.
@@ -154,18 +154,13 @@ export class IgxBadgeComponent {
154154 * @internal
155155 */
156156 get roleDescription ( ) {
157- let message : string ;
158-
159157 // tslint:disable-next-line:prefer-conditional-expression
160158 if ( this . icon ) {
161- message = this . type + ' type badge with icon type ' + this . icon ;
162- } else if ( this . value ) {
163- message = this . type + ' badge type with value ' + this . value ;
164- } else {
165- message = this . type + ' badge type without value' ;
159+ return this . type + ' type badge with icon type ' + this . icon ;
160+ } else if ( this . value || this . value === 0 ) {
161+ return this . type + ' badge type with value ' + this . value ;
166162 }
167-
168- return message ;
163+ return this . type + ' badge type without value' ;
169164 }
170165
171166 /**
You can’t perform that action at this time.
0 commit comments