angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

Cookie path not settable using $cookies service

Open ghost opened this issue 13 years ago • 35 comments

When using the $cookies service, there is no easy way to set the path of the cookie to match every path on the domain.

On line 3137 of angular.1.0.2.js the path of all cookies created is set as self.baseHref() When trying to write the same cookie from different paths this results in additional cookies being created due to the different path.

With no facility implemented to pass in a path, the path needs to be hard coded in order to be changed.

ghost avatar Jan 10 '13 17:01 ghost

:+1:

mike-spainhower avatar Jun 20 '13 16:06 mike-spainhower

:+1:

boltonbytes avatar Aug 16 '13 05:08 boltonbytes

Did this ever get accepted?

jaymes-bearden avatar Oct 23 '13 19:10 jaymes-bearden

:+1:

odino avatar Oct 29 '13 12:10 odino

:+1:

hd-deman avatar Nov 16 '13 19:11 hd-deman

:+1:

derfsubterfuge avatar Dec 13 '13 05:12 derfsubterfuge

:+1:

HNygard avatar Mar 18 '14 09:03 HNygard

:thumbsup:

andrezero avatar Mar 21 '14 14:03 andrezero

We need this feature. +1

greengerong avatar Apr 02 '14 12:04 greengerong

+1

maxtillich avatar Apr 05 '14 16:04 maxtillich

+1

andyhorng avatar Apr 28 '14 10:04 andyhorng

+1

paveleremin avatar May 14 '14 07:05 paveleremin

+1

bdelaforest avatar May 15 '14 10:05 bdelaforest

+1

dreucodi avatar May 16 '14 12:05 dreucodi

:+1:

WhyNotHugo avatar May 23 '14 01:05 WhyNotHugo

+1

krisivanov avatar Jun 12 '14 19:06 krisivanov

+1

battlesnake avatar Jun 16 '14 21:06 battlesnake

In the meantime you can use https://github.com/ivpusic/angular-cookie.

example : ipCookie('cookie_key', data, { path: '/' });

bdelaforest avatar Jun 16 '14 21:06 bdelaforest

+1

ansorensen avatar Jul 01 '14 22:07 ansorensen

+1 I've finally used angular-cookie

h2non avatar Jul 02 '14 12:07 h2non