UNPKG

cobuild-angular-stack

Version:

Base stack angular sass jade gulp

42 lines (36 loc) 1.41 kB
(function(){ angular.module('uniko.statics') .controller('GuestPayController', GuestPayController); GuestPayController.$inject = ['$scope', '$uibModal']; function GuestPayController ($scope, $uibModal){ $scope.alertGuest = function () { var modalInstance = $uibModal.open({ animation: true, templateUrl: 'partials/guest.message.pay.html', size: 'lg', controller: ['$scope', '$uibModalInstance', 'Socialshare', '$translate', function ($scope, $uibModalInstance, url, Socialshare, $translate) { $scope.url = url; $scope.copied = false; $scope.$watch('copied', function (newVal) { if (newVal) { $scope.copied = false; $uibModalInstance.close(); } }); $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); }; }], resolve: { url: function () { return $scope.url; } } }); modalInstance.result .then(function (result) { console.log('open', result); }); }; } })();