I writing one constant file with Reff, I getting the follwing Exception If I tried like that :
angular.min.js:118 Error: [$injector:unpr] http://errors.angularjs.org/1.5.8/$injector/unpr?p0=ENVProvider%20%3C-%20ENV%20%3C-%20viewRoleController
I get the error above in console: My code as follows,
jsp:- included constant file location
angularController
var app = angular.module('App', ['angularUtils.directives.dirPagination','ui.bootstrap']);
app.controller('viewRoleController', function($scope, $http, ENV, viewRoleService) {
var dynamicData;
$http.get('js/commons/AngularConstantFile.js').then(function (response) {
dynamicData = response.data;
});
});
Constant file:-
var app = angular.module('App');
app.constant("ENV", {
"status412": "412",
"Success": "Success",
});