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 { url } from './services.js'; | |
class CardComponent extends HTMLElement { | |
constructor (){ | |
super(); | |
const shadow = this.attachShadow({mode: 'open'}); | |
const template = document.getElementById('card-view'); | |
const templateInstance = template.content.cloneNode(true); | |
shadow.appendChild(templateInstance); |
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
<ion-content padding> | |
<!-- #region value --> | |
<div class="contents"> | |
<ion-row> | |
<ion-input type="number" class="value-input" [(ngModel)]="fromValue" placeholder="from" (keyup)="calculateCurrencyOne()"></ion-input> | |
</ion-row> | |
<ion-row> | |
<ion-input type="number" class="value-input" [(ngModel)]="toValue" placeholder="to" (keyup)="calculateCurrencyTwo()"></ion-input> | |
</ion-row> |
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
calculateCurrencyOne() { | |
this.toValue = this.fromValue * parseFloat(this.resultRate); | |
} | |
calculateCurrencyTwo() { | |
this.fromValue = this.toValue / parseFloat(this.resultRate); | |
} |
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 } from '@angular/core'; | |
import { NavController } from 'ionic-angular'; | |
import { CurrencyService } from "../service/cu-service"; | |
import { WheelSelector } from '@ionic-native/wheel-selector'; | |
import { HttpClient } from '@angular/common/http'; | |
import { isNumber } from 'ionic-angular/umd/util/util'; | |
@Component({ | |
selector: 'page-home', |
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
<ion-content padding> | |
<div class="header"> | |
<ion-row> | |
<p>Convert</p> | |
</ion-row> | |
</div> | |
<!-- #region Value Inputs --> | |
<div class="contents"> | |
<ion-row> | |
<ion-input type="number" class="value-input"></ion-input> |