I\'m trying to use cookies within Angular - here\'s what I\'m trying:
In Angular 1.3.14 you can just use
var favoriteCookie = $cookies[user_id];
See the documentaiton here: Angular Cookies
The syntax you have is for version 1.4.x but you are referencing an older version. If you do not want to update to 1.4.x, you can use $cookieStore instead as follows:
$cookieStore.put("key", "value");
var value = $cookieStore.get("key");
Alternatively if you are using version 1.3.x or below, you can use $cookies as follows:
$cookies.key = "value";
var value = $cookies.key;
The following method should work.
var favoriteCookie = $cookies.user_id;