Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="http://code.angularjs.org/1.0.0rc10/angular-1.0.0rc10.js"></script>
<script src="http://code.angularjs.org/1.0.0rc10/angular-cookies-1.0.0rc10.js"></script>
<script>
angular.module('myApp', ['ngCookies'])
.controller('CookieCtrl', ['$scope', '$cookieStore', function ($scope, $cookieStore) {
// Put cookie
$cookieStore.put('mycookie', 'angularjs');
// Get cookie
$scope.lastVal = $cookieStore.get('mycookie');
//$cookieStore.remove('mycookie');
} ]);
</script>
</head>
<body ng-controller="CookieCtrl">
<span>{{lastVal}}</span>
</body>
</html>
The most helpful ANGULARJS solutions
How to get client ip address using angularjs ?ANGULARJS Click to see more ... 19.3K 2.8K