Angular JS

Using $cookieStore in Angular JS

app.controller(‘MainCtrl’, [‘$cookieStore’, function($cookieStore) {

$cookieStore.put(‘icar’,car); // to store values on cookies

var car_detail = $cookieStore.get(‘icar’); // to retrieve values on cookies

$cookieStore.remove(‘icar’); // to remove cookies

}

Advertisements