Skip to content

Instantly share code, notes, and snippets.

View clintonyeb's full-sized avatar
🏠
Working from home

Clinton Yeboah clintonyeb

🏠
Working from home
View GitHub Profile
<div
style={{ backgroundColor: getColorForPercent(percent) }}
className="singleCard"
>
<div className="card-body">
<div className="row">
<div className="col-6">
<Select
className="select-country"
value={selectedOption}
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 = '';
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 = '';
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 = '';
<div class="container mx-auto w-screen px-4">
<div class="w-full max-w-2xl">
<h1 class="text-center text-indigo-600 text-lg font-bold">
Moving Average
</h1>
<div class="flex flex-row bg-grey shadow-md rounded px-8 pt-6 pb-8 mb-4">
<form class="px-2 pt-6 pb-8 mb-4" (ngSubmit)="handleSubmit()" #heroForm="ngForm">
<div class="w-full mb-4">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Select Currency:
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 = '';
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class AppService {
constructor(private http: HttpClient) { }
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 = '';
<div class="px-2 pt-6 pb-8 mb-4">
<div>
<span class="text-center text-gray-600 text-lg font-bold m-2">
Moving Average:
</span>
{{movavg ? movavg : "Please wait..."}}
</div>
<div>
<span class="text-center text-gray-600 text-lg font-bold m-2">
Ticker:
<div class="container mx-auto w-screen px-4">
<div class="w-full max-w-2xl">
<h1 class="text-center text-indigo-600 text-lg font-bold">
Moving Average
</h1>
<div class="flex flex-row bg-grey shadow-md rounded px-8 pt-6 pb-8 mb-4">
<form class="px-2 pt-6 pb-8 mb-4" (ngSubmit)="handleSubmit()" #heroForm="ngForm">
<div class="w-full mb-4">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Select Currency: