Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$cookie service should allow setting cookies that last longer than a session #4069

Closed
jan-molak opened this issue Sep 20, 2013 · 5 comments
Closed

Comments

@jan-molak
Copy link

Hi and thanks for all your awesome work on angular.js so far!

It seems like the browser service that's being used by the $cookie service hardcodes the expiration time of any cookie set with it: https://github.com/angular/angular.js/blob/master/src/ng/browser.js#L287

It would be great if it was made possible to specify expiration time as a parameter when setting a cookie.

@vincentbriglia
Copy link

Hi Jan. There's a provider drop-in for jQuery-cookie #2459 if you can't wait. This has been an open issue for the last 2 years and will be resolved, from what I gather, post 1.2

@jan-molak
Copy link
Author

Hey Vincent, haven't seen you in ages! :) jQuery drop-in looks like something I could use as a temporary workaround until 1.2 sees the light of day - thanks!

@poliveira89
Copy link

This issue is inactive for almost 1,5 years, anyone has a solution, other than jQuery plugins or "pure" Javascript?

@lgalfaso
Copy link
Contributor

lgalfaso commented Feb 5, 2015

@poliveira89 #10530 should make it into 1.4

@Narretz
Copy link
Contributor

Narretz commented Jun 6, 2015

It has made it into 1.4!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants