Having trouble with Angular and injecting $cookies into a controller.
The $cookies work fine in a service, but encountering issues in this specific controller.
var app = angular.module('app', [
"ui.router",
"ngCookies",
'ui.bootstrap']);
angular
.module("app")
.controller("ListController", ListController);
ListController.$inject = ['$scope', 'DataService', '$state', "AuthenticationService", "$cookies"];
function ListController($scope, DataService, $state, AuthenticationService, $cookies) {
....
}
The $cookies object is showing up as undefined. The angular-cookies.js file is included on the page, and functions correctly within the AuthenticationService that is also included.