Changed rootScope for scope

This commit is contained in:
Gustavo Cortez 2014-04-23 14:41:27 -03:00
parent 014b7310f4
commit 2b55e108f4
1 changed files with 3 additions and 3 deletions

View File

@ -42,14 +42,14 @@ angular.module('copay')
if (typeof vNum == "number" && vNum > 0) { if (typeof vNum == "number" && vNum > 0) {
if ($rootScope.availableBalance <= vNum) { if ($rootScope.availableBalance <= vNum) {
ctrl.$setValidity('enoughAmount', false); ctrl.$setValidity('enoughAmount', false);
$rootScope.notEnoughAmount = 'Insufficient funds!'; scope.notEnoughAmount = 'Insufficient funds!';
} }
else { else {
ctrl.$setValidity('enoughAmount', true); ctrl.$setValidity('enoughAmount', true);
$rootScope.notEnoughAmount = null; scope.notEnoughAmount = null;
} }
} else { } else {
$rootScope.notEnoughAmount = null; scope.notEnoughAmount = null;
} }
return value; return value;
} }