Adds fee-summary bar, adds amount directive, adds support for fee-summary overlapping with content on scrollable small screens
This commit is contained in:
parent
4b18e4b1c3
commit
2492a405a1
9 changed files with 154 additions and 1 deletions
21
src/js/directives/amount.js
Normal file
21
src/js/directives/amount.js
Normal 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);
|
||||
}]
|
||||
};
|
||||
}
|
||||
]);
|
||||
Loading…
Add table
Add a link
Reference in a new issue