I'm writing Javascript code using Angular cookies which I will be using in two applications, one of which uses Angular 1.4 so I can use the $cookies
getter and setter objects. But in the second application I'm using version 1.3 where I cant use the getter and setter objects. How can I write simple getter and setter cookies as the same object for both the versions?
For example:
$cookies.getObject("user.id");
$cookies.putObject("user.id", json.data, {
path: '/'
});