style(blackjack): format code and adjust whitespace
All checks were successful
All checks were successful
This commit is contained in:
parent
28f7b15d4c
commit
b5a6582905
2 changed files with 15 additions and 7 deletions
|
@ -1,4 +1,13 @@
|
|||
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Input,
|
||||
OnChanges,
|
||||
SimpleChanges,
|
||||
ElementRef,
|
||||
ViewChild,
|
||||
AfterViewInit,
|
||||
} from '@angular/core';
|
||||
import { CommonModule, CurrencyPipe } from '@angular/common';
|
||||
import { CountUp } from 'countup.js';
|
||||
|
||||
|
@ -6,9 +15,7 @@ import { CountUp } from 'countup.js';
|
|||
selector: 'app-animated-number',
|
||||
standalone: true,
|
||||
imports: [CommonModule, CurrencyPipe],
|
||||
template: `
|
||||
<span #numberElement>{{ formattedValue }}</span>
|
||||
`,
|
||||
template: ` <span #numberElement>{{ formattedValue }}</span> `,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AnimatedNumberComponent implements OnChanges, AfterViewInit {
|
||||
|
@ -35,7 +42,7 @@ export class AnimatedNumberComponent implements OnChanges, AfterViewInit {
|
|||
if (changes['value']) {
|
||||
if (this.countUp) {
|
||||
const endVal = this.value;
|
||||
|
||||
|
||||
this.countUp.update(endVal);
|
||||
this.previousValue = endVal;
|
||||
} else {
|
||||
|
@ -73,4 +80,4 @@ export class AnimatedNumberComponent implements OnChanges, AfterViewInit {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue