title: Error: [$injector:unpr] Unknown provider: chart.jsProvider
body: <p>I am trying to use this plugin <a href="https://github.com/jtblin/angular-chart.js" rel="nofollow">https://github.com/jtblin/angular-chart.js</a>.
  And I am getting this error (I don't think the problem is with the plugin instead it's in the way I'm doing the injection!!):</p>
  
  <pre><code>Error: [$injector:unpr] Unknown provider: chart.jsProvider &lt;- chart.js &lt;- WhateverCtrl
  http://errors.angularjs.org/1.3.20/$injector/unpr?p0=chart.jsProvider%20%3C-hart.js%20%3C-%20WhateverCtrl
      at http://mega.app/scripts/vendor.js:9895:12
      at http://mega.app/scripts/vendor.js:13863:19
      at Object.getService [as get] (http://mega.app/scripts/vendor.js:14010:39)
      at http://mega.app/scripts/vendor.js:13868:45
      at getService (http://mega.app/scripts/vendor.js:14010:39)
      at invoke (http://mega.app/scripts/vendor.js:14042:13)
      at Object.instantiate (http://mega.app/scripts/vendor.js:14059:27)
      at http://mega.app/scripts/vendor.js:18356:28
      at http://mega.app/scripts/vendor.js:44696:28
      at invokeLinkFn (http://mega.app/scripts/vendor.js:18113:9)
  </code></pre>
  
  <p>when I inject <code>chart.js</code> globally like below, I don't get any error. (keep reading)</p>
  
  <pre><code>angular.module('my-app', [
              'chart.js'      // &lt;&lt;&lt;&lt;&lt;
              'ui.router',            
              'ngStorage',
              // ...
          ]);
  
  })();
  </code></pre>
  
  <p>But from my understanding, it's recommended to inject this module only in the controllers that uses it, thus when I try to inject it in a controller like below, I get the error above.</p>
  
  <pre><code>angular
      .module('my-app')
      .controller('WhateverCtrl', ctrl);
  
  ctrl.$inject = ['chart.js'];     // &lt;&lt;&lt;&lt;&lt;
  
  function ctrl() {
      var vm = this;
  
  // ...
  </code></pre>
  
  <p>However if I remove the <code>$</code> from the injection line to <code>ctrl.inject = ['chart.js'];</code> I do get rid of the error, but <code>chart.js</code> wont work, because I guess I must pass it to the function <code>function ctrl() {</code> like this <code>function ctrl(chart.js) {</code> which of course causes an error due to the <code>.</code>.</p>