diff --git a/modules/articles/client/controllers/articles.client.controller.js b/modules/articles/client/controllers/articles.client.controller.js index 641eb600..2ee3cd1c 100644 --- a/modules/articles/client/controllers/articles.client.controller.js +++ b/modules/articles/client/controllers/articles.client.controller.js @@ -5,9 +5,9 @@ .module('articles') .controller('ArticlesController', ArticlesController); - ArticlesController.$inject = ['$scope', '$state', 'articleResolve', 'Authentication']; + ArticlesController.$inject = ['$scope', '$state', 'articleResolve', '$window', 'Authentication']; - function ArticlesController($scope, $state, article, Authentication) { + function ArticlesController($scope, $state, article, $window, Authentication) { var vm = this; vm.article = article; @@ -19,7 +19,7 @@ // Remove existing Article function remove() { - if (confirm('Are you sure you want to delete?')) { + if ($window.confirm('Are you sure you want to delete?')) { vm.article.$remove($state.go('articles.list')); } } diff --git a/modules/users/client/controllers/admin/user.client.controller.js b/modules/users/client/controllers/admin/user.client.controller.js index 7c0d491f..197a44ee 100644 --- a/modules/users/client/controllers/admin/user.client.controller.js +++ b/modules/users/client/controllers/admin/user.client.controller.js @@ -5,9 +5,9 @@ .module('users.admin') .controller('UserController', UserController); - UserController.$inject = ['$scope', '$state', 'Authentication', 'userResolve']; + UserController.$inject = ['$scope', '$state', '$window', 'Authentication', 'userResolve']; - function UserController($scope, $state, Authentication, user) { + function UserController($scope, $state, $window, Authentication, user) { var vm = this; vm.authentication = Authentication; @@ -16,7 +16,7 @@ vm.update = update; function remove(user) { - if (confirm('Are you sure you want to delete this user?')) { + if ($window.confirm('Are you sure you want to delete this user?')) { if (user) { user.$remove();