app.controller('errorCtrl', function ($scope, $http, notify) { $scope.email=""; $scope.reset = function(email) { $http.get("https://pedido.especificosba.com.ar/back/reset/" + email).then( function(data) { notify("Reiniciado correctamente"); }, function(err) { notify({classes:"alert alert-danger", message:"error"}); }); } });