Created
May 19, 2020 02:59
-
-
Save clintonyeb/1a6e133ebaf3b36d2d570b1abf79b345 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { AppService } from './app.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'], | |
}) | |
export class AppComponent implements OnInit { | |
currency = ''; | |
currencies; | |
tickCount = 0; | |
pipDiff = 0; | |
buyOrSell = ''; | |
ticker = 0; | |
movavg = 0; | |
webSocket; | |
averages; | |
constructor(private appService: AppService) {} | |
ngOnInit(): void { | |
this.appService.getCcyPair().subscribe((data: Array<any>) => { | |
this.currencies = data.map((d) => d['currency_name']); | |
this.currency = this.currencies[0]; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment