I am looking to check if a cookie is set in Angular. If the cookie is not found, I want to create a new one.
Currently, I have this code snippet:
if ($cookies.get('storedLCookie').length !== 0) {
$cookies.put('storedLCookie','Oatmeal');
}
However, it doesn't appear to be functioning as expected. Is there an alternative method to verify if a cookie is set in Angular?