I have
<body ng-app="myApp">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular-cookies.min.js">
</script>
</body>
Everything loads correctly.
Then in my javascript I attempt to inject ngCookies:
angular.module("myApp", ["ngCookies"]).
config(function($cookies) {
console.log($cookies.myCookie);
});
But it does not seem to find $cookies:
Unknown provider: $cookies from myApp
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…