calculate after creatr
This commit is contained in:
parent
9ec4e43ecf
commit
fb175d66ff
|
|
@ -41,12 +41,13 @@ export class AssetCalculatorComponent implements OnInit, OnDestroy{
|
|||
constructor(private assetService : AssetService ){
|
||||
this.assetsDepreciationFormGroup.valueChanges.subscribe( (value) => this.calculate() );
|
||||
this.lifeFormArray.valueChanges.subscribe( (value) => this.calculate() );
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void{
|
||||
const savedAsset = localStorage.getItem('assetForCalculator');
|
||||
if (savedAsset) this.assetToControls(JSON.parse(savedAsset));
|
||||
|
||||
this.calculate();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
|
|
|||
Loading…
Reference in New Issue