mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-16 23:16:48 +00:00
Adds a base for the buy component
This commit is contained in:
@@ -1 +1,30 @@
|
||||
<div>hello world</div>
|
||||
<div class="col-md-12">
|
||||
<div class="form col-md-12">
|
||||
<div class="row">
|
||||
<label>Exchange: </label><select ng-model="selectedExchange" class="form-control">
|
||||
<option ng-repeat="exchange in enabledExchanges">{{exchange.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Currency: </label><select ng-model="selectedCurrency" class="form-control">
|
||||
<option ng-repeat="currency in selectedExchange.Currencies">{{currency}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Lowest Ask: </label><label>{{selectedCurrency.Price}} 0.987359872639587623USD</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Price: </label><input class="form-control" type="number" placeholder="How much?" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Amount: </label><input class="form-control" type="number" placeholder="How much?" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Total: </label><label>{{price * amount}}</label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button class="form-control btn btn-success">Place Order</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -5,7 +5,16 @@ angular.module('myApp.buy',[]).component('buy', {
|
||||
bindings: {
|
||||
message: '='
|
||||
}
|
||||
}).controller('BuyController', function ($scope, $http, Notification) {
|
||||
alert(this.message);
|
||||
}).controller('BuyController', function ($http, Notification) {
|
||||
//This contrioller will retrieve all enabled exchanges,
|
||||
//their enabled currencies and the currency's latest ask
|
||||
//This call will be used for selling too
|
||||
//
|
||||
//This will allow a user to make decisions based onthe latest information to them
|
||||
//It will auto poll every X seconds (at least until a push method is implemented)
|
||||
//When all fields are valid, a purchase order will be sent to and handle by gocryptoServer
|
||||
|
||||
//Could also hard-type the exchange and currency via attributes on the component for quick use
|
||||
//Or at lest controlled by passing data from other components/data
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<h1>Dashboard</h1>
|
||||
<span app-version></span>
|
||||
<buy message="hi"></buy>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-12">
|
||||
@@ -15,8 +14,9 @@
|
||||
<div class="col-md-12" style=" height: 300px;">
|
||||
<h3>Market depth chart</h3>
|
||||
</div>
|
||||
<div class="col-md-4" style=" height: 300px;">
|
||||
<div class="col-md-4" >
|
||||
<h4>Buy</h4>
|
||||
<buy exchange="POLOINEX" currency="BTC_USD"></buy>
|
||||
</div>
|
||||
<div class="col-md-4" style=" height: 300px;">
|
||||
<h4>Sell</h4>
|
||||
|
||||
Reference in New Issue
Block a user