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

ng-cookies squashed #11222

Closed
wants to merge 6 commits into from
Closed

ng-cookies squashed #11222

wants to merge 6 commits into from

Conversation

shahata
Copy link
Contributor

@shahata shahata commented Mar 2, 2015

@petebacondarwin - the commits are not precisely as you requested since some of the commits you listed didn't seem right to me but I hope it is close enough :)

@petebacondarwin petebacondarwin mentioned this pull request Mar 2, 2015
@petebacondarwin
Copy link
Contributor

Apart from a couple of docs tweaks and removing the use of extend in $$cookieWriter this LGTM.
@shahata - let me know when those are done and we can land this

shahata added 4 commits March 3, 2015 00:12
The new API on `$cookies` includes:

 * `get`
 * `put`
 * `getObject`
 * `putObject`
 * `getAll`
 * `remove`

The new API no longer polls the browser for changes to the cookies and no longer copy
cookie values onto the `$cookies` object.

The polling is expensive and caused issues with the `$cookies` properties not
synchronizing correctly with the actual browser cookie values.

The reason the polling was originally added was to allow communication between
different tabs, but there are better ways to do this today (for example `localStorage`).

DEPRECATION NOTICE:

`$cookieStore` is now deprecated as all the useful logic
has been moved to `$cookies`, to which `$cookieStore` now simply
delegates calls.

BREAKING CHANGE:

`$cookies` no longer exposes properties that represent the current browser cookie
values. Now you must explicitly the methods described above to access the cookie
values. This also means that you can no longer watch the `$cookies` properties for
changes to the browser's cookies.

This feature is generally only needed if a 3rd party library was programmatically
changing the cookies at runtime. If you rely on this then you must either write code that
can react to the 3rd party library making the changes to cookies or implement your own polling
mechanism.

Closes #6411
Closes #7631
The `put`, `putObject` and `remove` methods now take an options parameter
where you can provide additional options for the cookie value, such as `expires`,
`path`, `domain` and `secure`.

Closes #8324
Closes #3988
Closes #1786
Closes #950
This change provides properties on `$cookiesProvider` so that you can set the application
level default options for cookies that are set using the `$cookies` service
The only feature of Angular using this mechanism was `$cookies`,
which no longer mirrors the browser cookie values and so does not
need to poll.
@petebacondarwin
Copy link
Contributor

LGTM - just checking the doc-gen and merging

@shahata shahata closed this in 9b35dfb Mar 2, 2015
hansmaad pushed a commit to hansmaad/angular.js that referenced this pull request Mar 10, 2015
The only feature of Angular using this mechanism was `$cookies`,
which no longer mirrors the browser cookie values and so does not
need to poll.

Closes angular#11222
netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015
The only feature of Angular using this mechanism was `$cookies`,
which no longer mirrors the browser cookie values and so does not
need to poll.

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

Successfully merging this pull request may close these issues.

3 participants