Angular Cookies don't work after ionic build

I’m tring to store logged in user information in Angular Cookies. Strangely it work’s well in browser when I do ionic serve. Also works in phone debug mode using ionic run android -l-c --debug usb debugging mode. But when I do ionic build android user information does not get stored in the $cookiestore.

I have referenced <script src="lib/angular-cookies/angular-cookies.min.js"></script> in my index.html

Have you debugged your application using Chrome Remote debugging?

I tried it but somehow couldn’t get it going. I then changed my implementation to $localstorage which works in both modes. Still I would want to know what was it that went wrong when I used $cookiestore