title: Ionic Angular JS cookie is not working
body: <p><strong>app.js</strong></p>
  
  <pre><code>angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'ngCordova', 'ngCookies'])
  
  .run(function ($ionicPlatform) {
  $ionicPlatform.ready(function () {
  
  if (window.cordova &amp;&amp; window.cordova.plugins &amp;&amp; window.cordova.plugins.Keyboard) {
  cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  cordova.plugins.Keyboard.disableScroll(true);
  
  }
           if (window.StatusBar) {
                  StatusBar.styleLightContent();
           }
  
  });
  })
  
  .config(function ($stateProvider, $urlRouterProvider) {
  
  $stateProvider
  
    .state('HomePage', {
               url: '/HomePage/:id',
               templateUrl: 'templates/HomePage.html',
               controller: 'HomePageCtrl'
           })
           .state('login', {
               url: '/login',
               templateUrl: 'templates/Login.html',
               controller: 'LoginCtrl'
           });
    $urlRouterProvider.otherwise('/login');
  
  });
  </code></pre>
  
  <p><strong>controllers.js</strong></p>
  
  <pre><code>angular.module('starter.controllers', [])
  
  .controller('LoginCtrl', function ($scope, LoginService, $ionicPopup, $state, $location, $http, $cookieStore) {
  
  $cookieStore.put('mycookie', 'cookie value');
  var favoriteCookie = $cookieStore.get('mycookie');
  
     var alertPopup = $ionicPopup.alert({
     title: 'favoriteCookie title',
     template: favoriteCookie // This does not work on phone.
  
  });})
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"&gt;
      &lt;title&gt;&lt;/title&gt;
  
      &lt;link href="lib/ionic/css/ionic.css" rel="stylesheet"&gt;
      &lt;link href="css/style.css" rel="stylesheet"&gt;
  
  
      &lt;script src="lib/ionic/js/ionic.bundle.js"&gt;&lt;/script&gt;
      &lt;script src="lib/ionic/ng-cordova-master/demo/www/lib/ngCordova/dist/ng-cordova.js"&gt;&lt;/script&gt;
      &lt;script src="cordova.js"&gt;&lt;/script&gt;
      &lt;script src="js/app.js"&gt;&lt;/script&gt;
      &lt;script src="js/controllers.js"&gt;&lt;/script&gt;
      &lt;script src="js/services.js"&gt;&lt;/script&gt;
      &lt;script src="lib/ionic/js/cookies.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body ng-app="starter"&gt;
  
      &lt;ion-nav-view&gt;&lt;/ion-nav-view&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>If i use <code>$cookieStore</code> it works on browser without any problem.</p>
  
  <p>However when i publish project to phone <code>$cookieStore</code> is not working. I mean When i try to use <code>$cookieStore</code> in android phone.</p>
  
  <p><code>$cookieStore</code> displays below error on <code>$ionicPopup.alert</code>.</p>
  
  <pre><code>undefined
  </code></pre>
  
  <p>How can i use cookie on android by using ionic?</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks.</p>