JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html ng-app="myApp">
<head>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"></script>
  <script src="//rawgithub.com/angular/angular.js/master/src/ngCookies/cookies.js"></script>

</head>
<body ng-controller="CookieCtrl">

Cookie Value: {{cookieValue}}

</body>
</html>

JavaScript

setCookie('custom', 'hmm', 1000);

console.log(document.cookie);

function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}

angular.module('myApp', ['ngCookies']);
function CookieCtrl($scope, $cookieStore) {
    console.log('get1', $cookieStore.get('custom'));
    console.log('get2', $cookieStore.get('City'));
    $cookieStore.put('City', 'London');
    $scope.cookieValue = $cookieStore.get('City');
}