Re: How to set cookie expire attribute with $cookieStore?

6,311 views
Skip to first unread message

Sutikshan Dubey

unread,
Sep 27, 2012, 10:42:45 AM9/27/12
to ang...@googlegroups.com
We also need similar functionality. Our Use case is:-

1. We want to store User's Authorization information in cookie which should not be lost upon refresh of browser.
2. We want to store authorization info in permanent-cookie in case user has opted for "Remember Me" check box at the time of log-on.

Thanks.

On Friday, July 6, 2012 9:47:38 PM UTC+5:30, Jose Larghi wrote:
Hi all,

Is possible set cookie expire attribute with $cookieStore? If not, how I can do it?

Thanks!
Jose.

Michael Bielski

unread,
Sep 27, 2012, 11:14:45 AM9/27/12
to ang...@googlegroups.com
I'd just be happy if both of those had some better documentation.

ganaraj p r

unread,
Sep 27, 2012, 11:19:37 AM9/27/12
to ang...@googlegroups.com
just my 2 cents.
You dont really have to use the ngCookieStore. Just find a good js library that provides a good and easy abstraction for cookie management. Wrap it in a service and bang. ngCookieStore and ngCookies are not even bundled with the core angular so its just like adding any other cookie manager!





On Thu, Sep 27, 2012 at 4:14 PM, Michael Bielski <michael...@yahoo.com> wrote:
I'd just be happy if both of those had some better documentation.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.



--
Regards,
Ganaraj P R

Michael Bielski

unread,
Sep 27, 2012, 11:24:15 AM9/27/12
to ang...@googlegroups.com
Honestly I don't even see the need to wrap it in Angular and abstract it. That would just add more code to be loaded and run just for the sake of having it in Angular. I'll pass, thanks.

ganaraj p r

unread,
Sep 27, 2012, 11:29:39 AM9/27/12
to ang...@googlegroups.com
Ofcourse you dont have to wrap it in a service. That part is optional. But if you are testing your app and want to include it using DI, wrapping it in a service makes sense. 

On Thu, Sep 27, 2012 at 4:24 PM, Michael Bielski <michael...@yahoo.com> wrote:
Honestly I don't even see the need to wrap it in Angular and abstract it. That would just add more code to be loaded and run just for the sake of having it in Angular. I'll pass, thanks.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en.
 
 

Sutikshan Dubey

unread,
Sep 27, 2012, 11:40:55 AM9/27/12
to ang...@googlegroups.com
what would you prefer to store auth info. On F5 it looses all. see http://sapling.scotchmedia.com/ in this proejct also, log-on and then press F5.
Any recommended plugin or service to access local-store and cookie? 

Michael Bielski

unread,
Sep 28, 2012, 1:06:19 PM9/28/12
to ang...@googlegroups.com
You could try localStorage and sessionStorage. Both should do what you want.
Reply all
Reply to author
Forward
0 new messages