Reputation: 532
I have added the chronicle.js
file as a library in my angular-js project.
But when I try to inject it in a controller, I get this error:
Error: [$injector:unpr] Unknown provider: ChronicleProvider <- Chronicle
http://errors.angularjs.org/1.2.13/$injector/unpr?p0=ChronicleProvider%20%3C-%20Chronicle
at angular.js:79
at angular.js:3557
at Object.getService [as get] (angular.js:3684)
at angular.js:3562
at getService (angular.js:3684)
at invoke (angular.js:3711)
at Object.instantiate (angular.js:3732)
at angular.js:6849
at angular.js:6231
at forEach (angular.js:312)
There's no syntax issue.
Please tell me what am I doing wrong? I am new to AngularJS.
Upvotes: 0
Views: 130
Reputation: 2761
Try a './' at the beginning of your script tag, like so:
<script src="./lib/angular-chronicle/chronicle.js"></script>
One way or other, presuming you followed the installation instructions correctly, I believe your application is just having trouble finding the library. It seems to know what it should be looking for to begin with.
Upvotes: 1