define(['quote/quote'], function (quote) { quote.controller('ResumeQuote', ['$scope', '$http', '$q', function ($scope, $http, $q) { $scope.idnumber; $scope.sentEmail; $scope.ResumeQuoteSubmit = function () { $scope.loadingNext = true; $scope.sentEmail; $scope.NavigationInProgress = true; $http({ method: 'POST', url: '/Quote/ResumeQuote/Submit', data: { idnumber: $scope.idnumber } }).then(function success(data, status, headers, config) { $scope.sentEmail = data.data; $scope.loadingNext = false; $scope.NavigationInProgress = false; }, function failure() { $scope.sentEmail = false; $scope.loadingNext = false; $scope.NavigationInProgress = false; }); } }]); });