I'm attempting to write a simple cookie using the AngularJS v1.5.x $cookies service. The dependencies are all correct, as I can read a cookie. However, neither write nor edit are working.
For example:
var blah = $cookies.get('mysite_auth');
console.log('old: ' + blah);
$cookies.put('mysite_auth', 'blech');
blah = $cookies.get('mysite_auth');
console.log('new: ' + blah);
... results in the following output:
old: ZmVhZDE ... =
new: ZmVhZDE ... =
No errors are thrown. The same occurs when attempting to write a new cookie:
$cookies.put('someCookie', 'yup');
I can write a cookie in my controller like so:
document.cookie = 'TEST=TESTVALUE';
What might be the cause of this?