.controller('myCtl', function ($scope) { $scope.showConfirm = function() { $scope.confirmMessage = 'Are you sure you want to?'; $scope.confirmVisible = true; }; $scope.doThing = function() { console.log('do something that requires confirmation'); }; })