title: AngularJS and issue with $localStorage from ngStorage : Error: [$injector:unpr] Unknown provider:
body: <p>It looks like my issue is quite simple (i'm probably dumb ;) ) but couldn't point it out.</p>
  
  <p>I found some topics about the same issue I have about localStorage (using ngStorage) on Angular but I can't understand why this syntax doesn't work : </p>
  
  <pre><code> function myCtrl($scope, $http, $resource, $storage, $localStorage) {
     ....
   }
  
   myCtrl.$inject = ['$scope', '$http', '$resource', '$storage', '$localStorage'];
  </code></pre>
  
  <p>Also I defined as well the app in app.js (after installing ngStorage) : </p>
  
  <pre><code> angular.module('onBoardingApp', ['ngStorage', 'ngResource']);
  </code></pre>
  
  <p>this generates this kind if error : </p>
  
  <pre><code> Error: [$injector:unpr] Unknown provider: $storageProvider &lt;- $storage
  </code></pre>
  
  <hr>
  
  <p>some are using the injection via angular.module (I tried it without any success)</p>
  
  <pre><code> angular.module('app', [
     'ngStorage'
   ]).controller('myCtrl', function(
     $scope,
     $localStorage
   ){
    //foo
   });
  </code></pre>
  
  <hr>
  
  <h2>EDIT</h2>
  
  <p>I finally get through this issue by using another factory : $store.
  Here is the source I used to make it work : <a href="http://jsfiddle.net/agrublev/QjVq3/" rel="nofollow">http://jsfiddle.net/agrublev/QjVq3/</a></p>