You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
feat($cookies): move logic into $cookies and deprecate $cookieStore
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#6411Closes#7631
0 commit comments