Mercado Libre: First steps
This commit is contained in:
parent
67612e547c
commit
9abd852f4b
18 changed files with 3648 additions and 0 deletions
24
src/js/controllers/mercadoLibre.js
Normal file
24
src/js/controllers/mercadoLibre.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('mercadoLibreController',
|
||||
function($scope, $timeout, $log, mercadoLibreService, externalLinkService, popupService) {
|
||||
|
||||
$scope.openExternalLink = function(url) {
|
||||
externalLinkService.open(url);
|
||||
};
|
||||
|
||||
var init = function() {
|
||||
mercadoLibreService.getPendingGiftCards(function(err, gcds) {
|
||||
if (err) $log.error(err);
|
||||
$scope.giftCards = gcds;
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.network = mercadoLibreService.getNetwork();
|
||||
init();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue