最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Angular $cookieStore service - share cookie with sub domains - Stack Overflow

programmeradmin0浏览0评论

I was wondering if there is a way to access an cookie set using angular $cookieStore service, from several different subdomains, let's say: api.yoursite www.yoursite and jsut yoursite

The documentation doesn't mention this issue at all.

Is there a solution, or do I have to use the lower level JavaScript cookies API?

I was wondering if there is a way to access an cookie set using angular $cookieStore service, from several different subdomains, let's say: api.yoursite. www.yoursite. and jsut yoursite.

The documentation doesn't mention this issue at all.

Is there a solution, or do I have to use the lower level JavaScript cookies API?

Share Improve this question asked Jul 9, 2014 at 13:11 Oleg BelousovOleg Belousov 10.1k14 gold badges74 silver badges128 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

The default cookieStore service in angular doesn't support this.

This feature has been requested before: https://github./angular/angular.js/issues/950 and others have asked similar questions: how to set domain for angularJS $cookies

It seems your options are to write your own cookeistore or use something else.

I would remend trying: https://github./ivpusic/angular-cookie

发布评论

评论列表(0)

  1. 暂无评论