From 6981a5af9fd44bc72f5ff7306b58aa5238cca14e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 8 Aug 2018 15:52:20 +0900 Subject: [PATCH] show only when it is ready --- src/js/directives/formattedAmount.js | 3 +++ www/views/includes/formatted-amount.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index ccf6c1963..b990596c4 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -21,6 +21,8 @@ angular.module('bitcoincom.directives') }, templateUrl: 'views/includes/formatted-amount.html', controller: function($scope, $timeout) { + $scope.canShow = false; + if (!$scope.currency && $scope.value) { // If there is no currency available.. // Try to extract currency from value.. var currencySplit = $scope.value.split(" "); @@ -120,6 +122,7 @@ angular.module('bitcoincom.directives') } break; } + $scope.canShow = true; }; formatNumbers($scope.currency, $scope.value); diff --git a/www/views/includes/formatted-amount.html b/www/views/includes/formatted-amount.html index 20063458d..24149849d 100644 --- a/www/views/includes/formatted-amount.html +++ b/www/views/includes/formatted-amount.html @@ -1,4 +1,4 @@
+ ng-class="{ 'size-equal': displaySizeEqual }" ng-show="canShow"> {{start}}{{middle}}{{end}}{{currency}}
\ No newline at end of file