Wallet/src/js/controllers/onboarding/disclaimer.js

30 lines
762 B
JavaScript
Raw Normal View History

2016-08-25 16:31:47 -03:00
'use strict';
2016-09-08 14:54:18 -03:00
angular.module('copayApp.controllers').controller('disclaimerController', function($scope, $timeout, $state, $log, $ionicModal, profileService) {
$scope.init = function() {
$scope.terms = {};
$scope.accept1 = $scope.accept2 = $scope.accept3 = false;
$timeout(function() {
$scope.$apply();
}, 1);
};
2016-08-25 16:31:47 -03:00
$scope.confirm = function() {
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
else {
$state.go('tabs.home');
}
});
};
2016-09-08 14:54:18 -03:00
$scope.openTermsModal = function() {
$ionicModal.fromTemplateUrl('views/modals/terms.html', {
2016-08-25 16:31:47 -03:00
scope: $scope
}).then(function(modal) {
2016-09-08 14:54:18 -03:00
$scope.termsModal = modal;
$scope.termsModal.show();
2016-08-25 16:31:47 -03:00
});
};
});