I'm using Angularjs in my project. I've set window.localStorage['foo'], but I need to use the data in other subdomains. For example, it starts on domain.com and goes to sub1.domain.com => sub2.domain.com.
So, when I try to use with the subdomains, I cannot access window.localStorage['foo'], and I need to set everything again.
Is there another way to do it?
Thanks
[ SOLUTION ]
I used ng-cookies and works good. angular/bower-angular-cookies
$cookies.put('myCookie', value, { domain: 'domain.com'} );
Thanks all answers!