Я работаю над угловым приложением. Это было рабочее приложение на Windows.
Теперь я переключился на Mac и пытаюсь собрать то же самое, но после сборки, когда я открываю приложение в браузере, выдает ошибку консоли: Uncaught Error: [$ injector: unpr]
https://code.angularjs.org/1.7.8/docs/error/$injector/unpr?p0=$cookieStoreProvider%20%3C-%20$cookieStore
Вот app.js:
angular
.module('xyz', [
'ui.router',
'Commons' ,
'ngCookies',
'ngMask',
'ui.bootstrap.datetimepicker',
'btorfs.multiselect',
'oitozero.ngSweetAlert'
])
.constant('GLOBAL_CONSTANTS', {
})
.config(['$urlRouterProvider', '$httpProvider', '$stateProvider', initializeConfigurationPhase])
.run(['$rootScope', '$cookieStore', 'httpService', 'notificationService', initializeRunPhase]);
function initializeRunPhase($rootScope, $cookieStore, httpService, notificationService) {
$rootScope.currentItem = 0;
$rootScope.baseUrl = "someurl";
// $rootScope.baseUrl = "http://localhost";
$rootScope.loggedIn = false;
if($cookieStore.get('access_token')) {
$rootScope.loggedIn = true;
notificationService.connect();
}
if(!$cookieStore.get('userCountryCode')) {
fetchUserCountry();
} else {
$rootScope.userCountryCode = $cookieStore.get('userCountryCode');
}
function fetchUserCountry () {
httpService.getWithoutData(url, true).then(function(response){
$cookieStore.put('userCountryCode',response.country_code);
$cookieStore.put('city',response.city);
$cookieStore.put('region_name',response.region_name);
});
}
}
Дайте мне знать, если я что-то упускаю или делаю что-то не так.