in my Angular-App I try to use cookies to store some values. But I keep getting
Error: $injector:unpr Unknown Provider
Unknown provider: $cookiesProvider <- $cookies <- setlistCtrl
In my html-file, I reference angular-cookies:
<script src="Scripts/angular.min.js"></script>
<script src="Scripts/angular-cookies.js"></script>
<script src="app/app.js"></script>
<script src="app/setlist/setlistCtrl.js"></script>
In the app.js, I create the module and reference ngCookies
(function () {
myModule = angular.module('myAngularApplication', ['ngCookies']);
}());
In the controller in setlistCtrl.js, I inject $cookies
(function () {
var setlistCtrl = function ($scope, $http, $cookies) {
var that = this;
...
angular.module('myAngularApplication').controller('setlistCtrl', ["$scope", "$http", "$cookies", setlistCtrl]);
}
}());
I use Visual Studio 2013 and the AngularJS 1.4.3 packet installed via NuGet.
Any idea, what might be wrong?
Thanks in advance,
Frank