Wallet/src/js/controllers/nextStepsController.js
2018-05-08 10:57:25 +02:00

27 lines
804 B
JavaScript

'use strict';
angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, configService) {
$scope.hide = false;
configService.whenAvailable(function(config) {
$scope.hide = config.homeSectionIsHidden&&config.homeSectionIsHidden['nextSteps']?config.homeSectionIsHidden['nextSteps']:false;
});
$scope.services = nextStepsService.get();
$scope.toggle = function() {
$scope.hide = !$scope.hide;
$timeout(function() {
$ionicScrollDelegate.resize();
$scope.$apply();
configService.set({homeSectionIsHidden: {nextSteps: $scope.hide}}, function(err) {
if (err) $log.debug(err);
});
}, 10);
};
$scope.open = function(url) {
window.open(url, '_system');
}
});