Adds fee-summary bar, adds amount directive, adds support for fee-summary overlapping with content on scrollable small screens

This commit is contained in:
Sam Cheng Hung 2018-07-26 14:29:53 +08:00
commit 2492a405a1
9 changed files with 154 additions and 1 deletions

View file

@ -0,0 +1,21 @@
'use strict';
angular.module('bitcoincom.directives')
.directive('amount', [
'$timeout',
function($timeout) {
return {
restrict: 'E',
scope: {
value: '=',
currency: '='
},
templateUrl: 'views/includes/amount.html',
controller: ['$scope', function($scope) {
var valueFormatted = parseFloat($scope.value).toFixed(8);
$scope.start = valueFormatted.slice(0, -5);
$scope.middle = valueFormatted.slice(-5, -2);
$scope.end = valueFormatted.substr(valueFormatted.length - 2);
}]
};
}
]);