I am using ng2-cookies, and it is clear from here that expiry is expected to be a number.
I want to set expiry as browser-session session
like it appears in dev-tools.
Any help?
I am using ng2-cookies, and it is clear from here that expiry is expected to be a number.
I want to set expiry as browser-session session
like it appears in dev-tools.
Any help?
Just tried sending undefined as value to optional param expiry
and it worked.
Cookie.set('token', user.token, undefined, '/');
If you want the expire to set as session, you could just send as follow:
Cookie.set('token', user.token);
And then the expiry will be set to session as default. At least, this has definitely worked with me.