diff --git a/web/app/app.js b/web/app/app.js index e0d3e438..2d100f75 100644 --- a/web/app/app.js +++ b/web/app/app.js @@ -11,6 +11,7 @@ angular.module('myApp', [ 'myApp.buy', 'myApp.sell', 'myApp.enabledExchanges', + 'myApp.buyOrders', 'myApp.stringUtils' ]). config(['$locationProvider', '$routeProvider', 'NotificationProvider', function($locationProvider, $routeProvider, NotificationProvider) { diff --git a/web/app/components/buy-orders/buy-orders.html b/web/app/components/buy-orders/buy-orders.html new file mode 100644 index 00000000..aff8fd27 --- /dev/null +++ b/web/app/components/buy-orders/buy-orders.html @@ -0,0 +1,20 @@ +
+ + + + + + + + + + + + + + + + + +
Price{{currencyOne}}{{currencyTwo}}Sum({{currencyTwo}})
{{buyOrder.price}}{{buyOrder.currencyOneAmount}}{{buyOrder.currencyTwoAmount}}{{buyOrder.sum}}
+
\ No newline at end of file diff --git a/web/app/components/buy-orders/buy-orders.js b/web/app/components/buy-orders/buy-orders.js new file mode 100644 index 00000000..9f742535 --- /dev/null +++ b/web/app/components/buy-orders/buy-orders.js @@ -0,0 +1,47 @@ + +angular.module('myApp.buyOrders',[]).component('buyorders', { + templateUrl: '/components/buy-orders/buy-orders.html', + controller:'BuyOrdersController', + controller: function ($scope, $http, Notification, $rootScope) { + $scope.currency = {}; + $scope.exchange = {}; + + $rootScope.$on('CurrencyChanged', function (event, args) { + $scope.currency = args.Currency; + $scope.exchange = args.Exchange; + $scope.currencyOne = $scope.currency.FirstCurrency; + $scope.currencyTwo = $scope.currency.SecondCurrency; + $scope.doTheThing(); + }); + + $scope.doTheThing = function() { + $scope.buyOrders = [ + {price:12,currencyOneAmount:12,currencyTwoAmount:13,sum:1111}, + {price:13,currencyOneAmount:15,currencyTwoAmount:13,sum:11231}, + {price:14,currencyOneAmount:232,currencyTwoAmount:13,sum:4511}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + {price:17,currencyOneAmount:22,currencyTwoAmount:13,sum:11212311}, + ]; + } + + } +}); + + + diff --git a/web/app/index.html b/web/app/index.html index 7eff60b4..1a7c90af 100644 --- a/web/app/index.html +++ b/web/app/index.html @@ -25,7 +25,7 @@ -