This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
More powerful $cookies service #950
Closed
Description
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.