function MainCtrl($http, $scope, ServiceFactory) { var vm = this; vm.loginStatus = "Login" vm.UserProfile = {}; vm.Action = { subscription: "loginResults", endpoint: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.login = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response[0].Status == "True") { ServiceFactory.UserProfile(vm.Action.subscription, response[0]); ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); window.location.href = "https://www.xenhey.com/" } }); } vm.readUserProfile = function () { vm.message = ServiceFactory.ReadLocally(vm.Action.subscription); } vm.readUserProfile(); function handleResultSet(event, id) { vm.UserProfile = ServiceFactory.StoreUserProfile; } } function logoutCtrl($scope, $log, ServiceFactory, $window, $location) { var vm = this; vm.logmeout = (function () { $window.localStorage.clear(); window.location.href = "https://www.xenhey.com" }); vm.logmeout(); } function appStoreCtrl($scope, $log, ServiceFactory, $window, $location) { var vm = this; } function loginCtrl($http, $scope, ServiceFactory) { var vm = this; vm.loginStatus = "Login" vm.UserProfile = {}; vm.Action = { subscription: "loginResults", endpoint: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response[0].Status == "True") { ServiceFactory.StoreUserProfile = response[0]; ServiceFactory.UserProfile(vm.Action.subscription, response[0]); vm.read(); window.location = '#/app/documents/' + response[0].Api_Key } else { window.location = '#/app/validation/failed' vm.message = "Opps Something happened." } }); } vm.read = (function () { vm.loginStatus = "login" vm.isLogin = false; ServiceFactory.StoreUserProfile = ServiceFactory.ReadLocally(vm.Action.subscription); if (ServiceFactory.StoreUserProfile != null) { ServiceFactory.UserProfileSubcription(vm.Action.subscription); vm.loginStatus = "logout" vm.isLogin = true; } }); function handleResultSet(event, id) { vm.UserProfile = ServiceFactory.StoreUserProfile; } vm.read(); } function translateCtrl($translate, $scope) { $scope.changeLanguage = function (langKey) { $translate.use(langKey); $scope.language = langKey; }; } function documentlistCtrl($scope, $log, $modal, $stateParams, ServiceFactory) { var vm = this; vm.Action = { subscription: "documentResult", endpoint: ServiceFactory.endpoints.DocumentList, endpointStore: ServiceFactory.endpoints.Store } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { ServiceFactory.Read(vm.Action.endpoint + '/' + $stateParams.id).then(function (response) { vm.results = response; ServiceFactory.StoreData = vm.results; return response; }); }); } function uploadImageCtrl($scope, $log, ServiceFactory) { var vm = this; vm.Action = { subscription: "imageResults" } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.AddNewDocument = function () { var f = document.getElementById('file').files[0]; r = new FileReader(); r.onload().then(function (e) { ServiceFactory.holdContent = r.target.result; ServiceFactory.Subscription(vm.Action.subscription); }); //r.readAsBinaryString(f); // $scope.data = e.target.result; //var dataResults = e.target.result; //ServiceFactory.holdContent = e.target.readAsBinaryString(f); //ServiceFactory.Subscription(vm.Action.subscription); } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function uploadImageCtrl2($scope, $log, $stateParams, ServiceFactory) { var vm = this; vm.uploadfile= {}; vm.Action = { subscription: "documents", endpoint: ServiceFactory.endpoints.Message, Fileendpoint: ServiceFactory.endpoints.File } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); $scope.fileChanged = function() { $scope.$apply(function() { var csvFileInput = document.getElementById('fileInput').files[0]; vm.headers.customer_filename = csvFileInput.name; vm.headers.filingid = $stateParams.id; var reader = new FileReader(); reader.onload = function(e) { vm.uploadfile = reader.result; }; reader.readAsDataURL (csvFileInput); }); }; vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.uploadfile, vm.headers).then(function (response) { vm.loading = true; ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); }); } vm.viewdocument = function(documents) { vm.headers = {'Content-type': 'application/json','filename': 'A04451D308C04FA89CC51CEA1E6DBDEE'} vm.headers.ContentType = documents.ContentType; ServiceFactory.SecureConnection(vm.Action.Fileendpoint, documents, vm.headers).then(function (response) { var fr=new FileReader(); fr.onload=function(){ displaying(fr.result,documents); } var fileData = new Blob([response]); fr.readAsText(fileData); }); } function displaying(resultData,payload) { var contentType = payload.ContentType; const a = document.createElement("a"); a.style.display = "none"; document.body.appendChild(a); const blob = new Blob([resultData], { type: contentType }); // Set the HREF to a Blob representation of the data to be downloaded a.href = window.URL.createObjectURL(blob); // Use download attribute to set set desired file name a.setAttribute("download", payload.customer_filename); // Trigger the download by simulating click a.click(); // Cleanup document.body.removeChild(a); } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function partnersCtrlV2($scope, $log, $modal, ServiceFactory) { var vm = this; vm.Action = { subscription: "partnerResults", Partners: ServiceFactory.endpoints.Partners, Partner: ServiceFactory.endpoints.Partner, readlob: ServiceFactory.endpoints.LineofBusness } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.delete = (function (deletepartner) { ServiceFactory.Delete(vm.Action.Partner, deletepartner).then(function (response) { vm.read(); }); }); vm.read = (function () { ServiceFactory.Read(vm.Action.Partners).then(function (response) { vm.results = response; return response; }); }); vm.openForm = function (currentState) { vm.Status = currentState == undefined ? "Add" : "Edit"; var modalInstance = $modal.open({ templateUrl: "views/partner_details.html", windowClass: "animated fadeIn", size: "lg", controller: 'popupFormCtrl', controllerAs: 'vm', resolve: { items: function () { return ObjInfo = { EndpointUrl: vm.Action.Partner, Read: vm.Action.Partners, Status: vm.Status, PublisherUrl: vm.Action.subscription, ViewModel: currentState } } } }); }; vm.readLob = (function () { ServiceFactory.Read(vm.Action.readlob).then(function (response) { ServiceFactory.StoreData = response; return response; }); }); vm.read(); vm.readLob(); vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function Registration($scope, $modal, ServiceFactory) { var vm = this; vm.Action = { subscription: "registrationresults", endpoint: ServiceFactory.endpoints.register } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { ServiceFactory.Read(vm.Action.endpoint).then(function (response) { vm.results = response; ServiceFactory.StoreData = vm.results; return response; }); }); vm.delete = function (deleteRecord) { ServiceFactory.Delete(vm.Action.endpoint, deleteRecord).then(function (response) { vm.read(); return response; }); }; vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.register, vm.headers).then(function (response) { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.resultmessage = response.Reason; vm.register = {}; }); } vm.read(); vm.packagechoice = [ { "Package": "Personal" }, { "Package": "Proffessional" }, { "Package": "Ultimate" } ]; vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function contactCtrl($scope, $modal, ServiceFactory) { var vm = this; vm.visible = false; vm.completed = true vm.Action = { subscription: "contactResults", endpoint: ServiceFactory.endpoints.email } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { vm.resultmessage = "Thank you for submitting your request. A follow-up email has been sent out." vm.visible = true; vm.completed = false; vm.message = {}; } }); } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function consultCtrl($scope, $modal, ServiceFactory) { var vm = this; vm.visible = false; vm.completed = true vm.Action = { subscription: "contactResults", endpoint: ServiceFactory.endpoints.email } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { vm.resultmessage = response.Reason vm.visible = true; vm.completed = false; vm.message = {}; } }); } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function validationCtrl($scope, $modal, $stateParams, ServiceFactory) { var vm = this; vm.search = {}; vm.payload = {}; vm.visible = false; vm.Action = { subscription: "validationResults", endpoint: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { vm.headers = { 'Content-type': 'application/json', 'filename': '07BDF9CD6D5B4F91B20C7233AAAB39AF' }; vm.payload.ReferenceNo = $stateParams.id; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.payload, vm.headers).then(function (response) { vm.results = response; vm.message = vm.results.Reason; ServiceFactory.StoreData = vm.results; vm.visible = true; return response; }); }); vm.read(); function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function profileCtrl($scope, $modal, ServiceFactory) { var vm = this; vm.visible = false; vm.Action = { subscription: "loginResults", creditCardResult: "createResults", endpoint: ServiceFactory.endpoints.profle, createcustomer: ServiceFactory.endpoints.createcustomer, profileInfo: ServiceFactory.profile, creditcard: ServiceFactory.endpoints.creditcard, Message: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); var unbindCreateResults = $scope.$on(vm.Action.creditCardResult, handleCardResults); vm.read = (function () { ServiceFactory.StoreUserProfile = ServiceFactory.ReadLocally(vm.Action.subscription); if (ServiceFactory.StoreUserProfile != null) { ServiceFactory.UserProfileSubcription(vm.Action.subscription); vm.loginStatus = "logout" vm.isLogin = true; vm.getCreditInfo(); } }); vm.getCreditInfo = (function () { vm.createinformation = {}; ServiceFactory.UpdateWithApiKey(vm.Action.creditcard, vm.createinformation, 'POST').then(function (response) { vm.creditcardinfo = true; ServiceFactory.holdContent = response.itemResult ServiceFactory.Subscription(vm.Action.creditCardResult); }); }); vm.submit = function () { //vm.showspinner = true; vm.credit.Name = vm.UserProfile.FirstName + ' ' + vm.UserProfile.LastName; vm.credit.Email = vm.UserProfile.EmailAddress; vm.credit.PAT = vm.UserProfile.Api_Key; if (vm.myCardDetails.RowKey != null) { vm.headers.filename = '25B264C22E3343B39605B971EBE000D9'; vm.credit.Id = vm.myCardDetails.RowKey } ServiceFactory.SecureConnection(vm.Action.Message, vm.credit, vm.headers).then(function (response) { if (response.StatusCode == "Success") { vm.resultmessage = "Thank you for submitting your request. You reference Number " + response.Reason; vm.visible = true; vm.completed = false; vm.message = {}; } }); } vm.editCreditCard = function () { vm.creditcardinfo = false; vm.updatingCreditCard = true; } vm.read(); function handleResultSet(event, id) { vm.UserProfile = ServiceFactory.StoreUserProfile; } function handleCardResults(event, id) { vm.myCardDetails = ServiceFactory.holdContent; } } function registerCtrl($scope, $modal, ServiceFactory) { var vm = this; vm.visible = false; vm.Action = { subscription: "registerResults", endpoint: ServiceFactory.endpoints.register } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.packagechoice = [ { "Package": "" }, { "Package": "Personal" }, { "Package": "Proffessional" }, { "Package": "Ultimate" } ]; vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.resultmessage = response.Reason; vm.message = {} } }); } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function popupFormCtrl($scope, items, $modalInstance, $log, ServiceFactory) { var vm = this; vm.show = false; vm.results = ServiceFactory.StoreData; vm.holdContent = ServiceFactory.holdContent; vm.payload = items.ViewModel == undefined ? {} : items.ViewModel; vm.item = items; vm.AdditonalInfo = []; vm.EditProcess = function (currentState) { vm.show = true; vm.tab = 2; vm.editContent = currentState }; vm.read = (function () { ServiceFactory.Read(vm.item.Read).then(function (response) { ServiceFactory.holdContent = response; ServiceFactory.Subscription(vm.item.PublisherUrl); return response; }); }); vm.cancel = function () { $modalInstance.close(); }; } function supportformCtrl($scope, $modal, ServiceFactory) { var vm = this; vm.visible = false; vm.completed = true vm.showspinner = false; vm.Action = { subscription: "supportFormResults", endpoint: ServiceFactory.endpoints.email } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { vm.showspinner = true; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { vm.resultmessage = response.Reason; vm.visible = true; vm.completed = false; vm.message = {}; } }); } function handleResultSet(event, id) { vm.results = ServiceFactory.holdContent; } } function surveyCtrl($scope, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.Action = { subscription: "messageResults", endpointStore: ServiceFactory.endpoints.Store, PostSurvey: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { ServiceFactory.Read(vm.Action.endpointStore + '/FAB44EE7A4234E9784E183D503F21092').then(function (response) { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); return response; }); }); vm.submit = function() { vm.payload.Survey = vm.results vm.payload.CreationDate = new Date(); ServiceFactory.SecureConnection(vm.Action.PostSurvey, vm.payload, vm.headers).then(function (response) { vm.visible = true; vm.resultmessage = "Thank you for taking the skills survey"; vm.results = {}; vm.form = false; }); } vm.read(); function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function messagesCtrl($scope, $log, $modal, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.Action = { subscription: "messageResults", endpoint: ServiceFactory.endpoints.Message, endpointStore: ServiceFactory.endpoints.Store } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { vm.headers = { 'Content-type': 'application/json', 'filename': '0D944292BA4440B5862FA7D52EEFE000' }; vm.search.id = $stateParams.id; vm.payload.ReferenceNo = $stateParams.id; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.payload, vm.headers).then(function (response) { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); return response; }); }); vm.submit = function () { vm.message.PartitionKey = vm.results[0].PartitionKey; vm.message.Recipient = vm.results[0].Recipient; vm.message.ContactNo = vm.results[0].ContactNo; vm.message.Name = vm.results[0].Name; vm.headers = { 'Content-type': 'application/json', 'filename': 'CED1CF018FEF44B88BB99C28A61FDF70' }; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.message = {}; vm.read(); } }); } vm.AddNewDocument = function () { vm.Action = { subscription: "binaryResults" } var f = document.getElementById('file').files[0]; r = new FileReader(); r.onloadend = function (e) { // $scope.data = e.target.result; var dataResults = e.target.result; ServiceFactory.UpdateWithApiKey(vm.Action.endpointStore, dataResults, 'POST').then(function (response) { vm.read(); return response; }); } r.readAsBinaryString(f); }; vm.read(); vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function trainingCtrl($scope, $log, $modal, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.visible = {}; vm.Action = { subscription: "trainingResults", endpoint: ServiceFactory.endpoints.training } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { vm.visible = true; vm.resultmessage = "Conformation Code " + response.RowKey; ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.message = {}; vm.read(); } }); } vm.read = (function () { vm.visible = false; }); vm.read(); vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function trainingListCtrl($scope, $log, $modal, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.visible = {}; vm.Action = { endpoint: ServiceFactory.endpoints.training } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { vm.headers = { 'Content-type': 'application/json', 'filename': '' }; vm.search.id = $stateParams.id; vm.payload.RowKey = $stateParams.id; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.payload, vm.headers).then(function (response) { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); return response; }); }); vm.read = (function () { vm.visible = false; }); vm.read(); vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function invoiceCtrl($scope, $log, $modal, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.Action = { subscription: "messageResults", endpoint: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.message = {}; vm.read(); } }); } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function invoiceDetailsCtrl($scope, $log, $modal, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.Action = { subscription: "messageResults", endpoint: ServiceFactory.endpoints.Message } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.submit = function () { vm.message.ReferenceNo = vm.search.id ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.message = {}; vm.read(); } }); } vm.read = (function () { vm.headers = { 'Content-type': 'application/json', 'filename': '99905F68CB4544D29AC406DE2A1F3FBC' }; vm.search.id = $stateParams.id; vm.payload.ReferenceNo = $stateParams.id; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.payload, vm.headers).then(function (response) { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); return response; }); }); vm.read(); function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; var total = 0; for (var i = 0; i < vm.results.length; i++) { if (isNaN(vm.results[i])) { continue; } total += Number(vm.results[i]); } vm.TotalAmount = total; } } function resetCtrl($scope, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.visible = {}; vm.Action = { subscription: "messageResults", endpoint: ServiceFactory.endpoints.Message, endpointStore: ServiceFactory.endpoints.Store } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { vm.visible = false; vm.search.id = $stateParams.id; vm.payload.VerificationCode = $stateParams.id; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.payload, vm.headers).then(function (response) { vm.results = response; ServiceFactory.StoreData = vm.results; return response; }); }); vm.submit = function () { vm.message.VerificationCode = vm.payload.VerificationCode; vm.message.ClearCode = ''; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.visible = true vm.resultmessage = "Password Reset Successful" vm.message = {}; vm.read(); } }); } vm.read(); vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } function recoveryCtrl($scope, $stateParams, ServiceFactory) { var vm = this; vm.payload = {}; vm.search = {}; vm.Action = { subscription: "messageResults", endpoint: ServiceFactory.endpoints.Message, endpointStore: ServiceFactory.endpoints.Store } var unbindResults = $scope.$on(vm.Action.subscription, handleResultSet); vm.read = (function () { vm.search.id = $stateParams.id; vm.payload.ReferenceNo = $stateParams.id; ServiceFactory.SecureConnection(vm.Action.endpoint, vm.payload, vm.headers).then(function (response) { vm.results = response; ServiceFactory.StoreData = vm.results; return response; }); }); vm.submit = function () { ServiceFactory.SecureConnection(vm.Action.endpoint, vm.message, vm.headers).then(function (response) { if (response.StatusCode == "Success") { ServiceFactory.StoreData = response; ServiceFactory.Subscription(vm.Action.subscription); vm.message = {}; } }); } vm.ViewDetails = function (details) { console.log(details); vm.visible = false; vm.Details = details; vm.visible = true; } function handleResultSet(event, id) { vm.results = ServiceFactory.StoreData; } } angular .module('pbs') .controller('MainCtrl', MainCtrl) .controller('popupFormCtrl', popupFormCtrl) .controller('partnersCtrlV2', partnersCtrlV2) .controller('Registration', Registration) .controller('documentlistCtrl', documentlistCtrl) .controller('contactCtrl', contactCtrl) .controller('registerCtrl', registerCtrl) .controller('validationCtrl', validationCtrl) .controller('profileCtrl', profileCtrl) .controller('uploadImageCtrl', uploadImageCtrl) .controller('uploadImageCtrl2', uploadImageCtrl2) .controller('supportformCtrl', supportformCtrl) .controller('messagesCtrl', messagesCtrl) .controller('surveyCtrl', surveyCtrl) .controller('resetCtrl', resetCtrl) .controller('recoveryCtrl', recoveryCtrl) .controller('invoiceCtrl', invoiceCtrl) .controller('invoiceDetailsCtrl', invoiceDetailsCtrl) .controller('consultCtrl', consultCtrl) .controller('trainingCtrl', trainingCtrl) .controller('trainingListCtrl', trainingListCtrl) .controller('loginCtrl', loginCtrl) .controller('logoutCtrl', logoutCtrl) .controller('appStoreCtrl', appStoreCtrl)