Wallet/src/js/controllers/proposals.js

24 lines
600 B
JavaScript
Raw Normal View History

2016-09-01 19:14:18 -03:00
'use strict';
angular.module('copayApp.controllers').controller('proposalsController',
function($timeout, $scope, profileService, $log, txpModalService) {
$scope.fetchingProposals = true;
2016-09-01 19:14:18 -03:00
$scope.$on("$ionicView.enter", function(event, data){
2016-09-01 19:14:18 -03:00
profileService.getTxps(50, function(err, txps) {
$scope.fetchingProposals = false;
2016-09-01 19:14:18 -03:00
if (err) {
$log.error(err);
2016-09-01 19:14:18 -03:00
return;
}
$scope.txps = txps;
$timeout(function() {
$scope.$apply();
}, 1);
});
});
2016-09-01 19:14:18 -03:00
$scope.openTxpModal = txpModalService.open;
});