Prevents reassignment of bound attribute size-equal

This commit is contained in:
Sam Cheng Hung 2018-07-31 15:44:59 +08:00
commit 5a0c1417d4
3 changed files with 8 additions and 2 deletions

View file

@ -23,7 +23,7 @@ angular.module('bitcoincom.directives')
},
templateUrl: 'views/includes/amount.html',
controller: ['$scope', function($scope) {
if (typeof $scope.sizeEqual == 'undefined') $scope.sizeEqual = false;
$scope.displaySizeEqual = typeof $scope.sizeEqual == 'undefined' ? false : true;
var decimalPlaces = {
'0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'],

View file

@ -1,4 +1,4 @@
<div class="amount"
ng-class="{ 'size-equal': sizeEqual }">
ng-class="{ 'size-equal': displaySizeEqual }">
<span ng-if="start.length > 0" class="start">{{start}}</span><span ng-if="middle.length > 0" class="middle">{{middle}}</span><span ng-if="end.length > 0" class="end">{{end}}</span><span ng-if="currency.length > 0" class="currency">{{currency}}</span>
</div>

View file

@ -21,6 +21,12 @@
<span translate>Download</span>
</div>
</div>
<div ng-init="fee = {
value: 0.1938473,
currency: 'BCH'
};">
<amount value="fee.value" currency="fee.currency"></amount>
</div>
<div class="list card homeTip" ng-if="homeTip">
<div class="item item-icon-right item-heading">