summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/errors/error.controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/errors/error.controller.js')
-rw-r--r--ecomp-portal-FE-common/client/app/views/errors/error.controller.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/errors/error.controller.js b/ecomp-portal-FE-common/client/app/views/errors/error.controller.js
new file mode 100644
index 00000000..5f4f410d
--- /dev/null
+++ b/ecomp-portal-FE-common/client/app/views/errors/error.controller.js
@@ -0,0 +1,20 @@
+'use strict';
+(function () {
+ class ErrorCtrl {
+ constructor($log, $scope,$state) {
+ $scope.errorState = $state.current.name;
+ if($scope.errorState=='root.error404'){
+ $scope.errorTitle="Page Not Found";
+ $scope.errorMsg="The page you are looking for cannot be found";
+ }else if($scope.errorState=='noUserError'){
+ $scope.errorTitle="Authorization denied";
+ $scope.errorMsg= "Please Contact Your Administrator for the page access";
+ }else {
+ $scope.errorTitle="Something went wrong";
+ $scope.errorMsg= "Please go back to the previous page";
+ }
+ }
+ }
+ ErrorCtrl.$inject = ['$log','$scope','$state'];
+ angular.module('ecompApp').controller('ErrorCtrl', ErrorCtrl);
+})(); \ No newline at end of file