UNPKG

client-ui

Version:

Testing implementation of nodeJs Backend, angular frontend, and hopefully in a way that this can be deployed to s3/cloudfront

33 lines (25 loc) 921 B
/* global angular */ (function () { "use strict"; function sorryController($stateParams, loadingService, loan) { var self = this; function init() { if (loadingService.modal) { loadingService.close(); } if ($stateParams.reasons) { self.reasons = $stateParams.reasons; } else if (loan.getCurrentLoan() && loan.getCurrentLoan().denialReasons) { self.reasons = loan.getCurrentLoan().denialReasons; } else { self.error = true; self.reasons = false; } } self.init = init; self.reasons = false; self.error = false; } angular.module("clientApp").controller("sorryController", sorryController); sorryController.$inject = ["$stateParams", "loadingService", "loan"]; }());