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

More powerful $cookies service

Open reichart opened this issue 14 years ago • 67 comments

I want to set a cookie on the root path / so it's available everywhere on the domain.

But the $cookies service only accepts name and value, and always sets the cookie path to the current page via self.baseHref().

Could the $cookies service be extended to provide access to additional cookie properties like path, expires, domain and secure?

I quite like the API of the jquery.cookie plugin: https://github.com/carhartl/jquery-cookie#usage. It keeps the common name=value use case simple and allows to set additional cookie properties via a third options object parameter.

I'm not very proficient in Javascript but I might try to implement something over the weekend.

reichart avatar May 11 '12 11:05 reichart

:+1:

stevermeister avatar Aug 19 '14 11:08 stevermeister

:+1:

sricc avatar Aug 27 '14 20:08 sricc

I'm tired of waiting when it's merged created own module to deal with domain, path, etc.. welcome https://github.com/stevermeister/ng-biscuit

stevermeister avatar Aug 27 '14 20:08 stevermeister

👍

TobbbeSv avatar Aug 28 '14 09:08 TobbbeSv

om :+1:

carueda avatar Sep 12 '14 03:09 carueda

:thumbsup:

nancoder avatar Sep 13 '14 03:09 nancoder

+1

bfowle avatar Sep 17 '14 23:09 bfowle

+9001

Jazzepi avatar Sep 18 '14 02:09 Jazzepi

+1

marcmenges avatar Sep 18 '14 12:09 marcmenges

+1

taly avatar Sep 20 '14 17:09 taly

+1

ghost avatar Sep 24 '14 21:09 ghost

:+1:

takashi avatar Oct 06 '14 10:10 takashi

+1

sjogreen-sp avatar Oct 07 '14 21:10 sjogreen-sp

Plus one

JordanRClark avatar Oct 07 '14 21:10 JordanRClark

+1

corkupine avatar Oct 21 '14 17:10 corkupine

:+1:

grantgeorge avatar Nov 04 '14 15:11 grantgeorge

:+1:

dallasvogels avatar Dec 10 '14 22:12 dallasvogels

:+1:

Tipe CMS

PatrickJS avatar Dec 11 '14 22:12 PatrickJS

Is this one still up for grabs by the community? I would love to take it on.

Ppchiu avatar Dec 16 '14 02:12 Ppchiu

I, like @Ppchiu, would be willing to take this on.

martinmcwhorter avatar Dec 16 '14 17:12 martinmcwhorter