title: how to inject $cookie in custom service of angularjs?
body: <p>I am using angularjs and according to to its <a href="https://docs.angularjs.org/api/ngCookies/service/$cookies" rel="nofollow">documentation</a> i most use cookies with ngCookies. I add ngCookie with this structure :</p>
  
  <ol>
  <li>add angular.js and angular-cookies.min.js to my index.html </li>
  <li><p>inject ngCookie to to my app using this code : </p>
  
  <pre><code>var app = angular.module('test',
  ['ngRoute','ngAnimate','ngFileUpload','ngSanitize','ngCookies']);
  </code></pre></li>
  <li><p>and now i inject ng-cookie to my own service :</p>
  
  <pre><code>app.service("transactionService",
  
    ["$cookie", "$http","sessionStorageService",
    function($cookie, $http, sessionStorageService){
  
          $cookies.put("unique_code",123456);
          console.log(sessionStorageService.getCurrentUser().sessionid);
          console.log($cookies.get("unique_code"));
          return;
      }
  ]);
  </code></pre></li>
  </ol>
  
  <p>but i am getting this error: 
      Error: [$injector:unpr] </p>
  
  <p>where am i wrong? </p>