angular/angular.js — pull request #6335 by kbanman (2014-02-19 05:54:25+00:00)
Title: feat(ngCookies): Additional parameters for $cookies service (domain, expires, secure)

This PR allows setting additional parameters on cookies created by $cookieStore. The changes are only on $browser to avoid major changes.

It seems to me the cookie logic could be somehow moved to $cookies, but I will leave that to someone else.

The `expires` parameter can be specified as integer seconds or as a `Date` object.

The parameters are set as follows:
```
angular.extend($browser.cookieOptions, {
path: '/',
domain: '.example.com',
expires: 3600
});
```

Closes #590, and is an alternative PR to #2459