This commit is contained in:
Jean-Baptiste Dominguez 2018-07-04 17:17:39 +09:00
commit bbe78ea4ca
2 changed files with 60 additions and 28 deletions

View file

@ -23,11 +23,13 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.$on("$ionicView.afterEnter", function() {
startupService.ready();
bannerService.fetchBannerSettings(function(banners) {
var banner = banners[Math.floor(Math.random()*banners.length)];
$scope.bannerImageUrl = bannerService.getBannerImage(banner);
$scope.bannerUrl = banner.url;
$scope.bannerIsLoading = false;
bannerService.getBanner(function (banner) {
$scope.$apply(function () {
$scope.bannerImageUrl = banner.imageURL;
$scope.bannerUrl = banner.url;
$scope.bannerIsLoading = false;
});
});
});