|
|
@ -37,6 +37,8 @@ export class ValueComponent implements OnChanges { |
|
|
|
public constructor() {} |
|
|
|
|
|
|
|
public ngOnChanges() { |
|
|
|
this.initializeVariables(); |
|
|
|
|
|
|
|
if (this.value || this.value === 0) { |
|
|
|
if (isNumber(this.value)) { |
|
|
|
this.isNumber = true; |
|
|
@ -120,4 +122,12 @@ export class ValueComponent implements OnChanges { |
|
|
|
this.useAbsoluteValue = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private initializeVariables() { |
|
|
|
this.absoluteValue = 0; |
|
|
|
this.formattedValue = ''; |
|
|
|
this.isNumber = false; |
|
|
|
this.isString = false; |
|
|
|
this.useAbsoluteValue = false; |
|
|
|
} |
|
|
|
} |
|
|
|