Browse Source

web-ui: Add config file with first value currentCurrency

Add config file in app/
Use config value currentCurrency in explorerCurrency pipe
prometheus-integration
jonsadev 6 years ago
parent
commit
e0e2606f13
  1. 3
      web-ui/src/app/config.ts
  2. 3
      web-ui/src/app/pipes/explorer-currency.pipe.ts

3
web-ui/src/app/config.ts

@ -0,0 +1,3 @@
export class Config {
static currentCurrency = 'XSN';
}

3
web-ui/src/app/pipes/explorer-currency.pipe.ts

@ -1,10 +1,11 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Config } from '../config';
@Pipe({
name: 'explorerCurrency'
})
export class ExplorerCurrencyPipe implements PipeTransform {
transform(currency: any): string {
return `${ currency } XSN`;
return `${ currency } ${ Config.currentCurrency }`;
}
}

Loading…
Cancel
Save