title: Set a cookie in Angular if one does not exist
body: <p>I want to see if a cookie has been set in Angular, and if it doesn't find a cookie, it will create a new one.</p>
  
  <p>Right now I'm using this:</p>
  
  <pre><code>    if ($cookies.get('storedLCookie').length != 0) {
         $cookies.put('storedLCookie','Oatmeal');
      }
  </code></pre>
  
  <p>It doesn't seem to be working, though. Is there another way to test if a cookie is set in Angular?</p>