I am creating car searching module using Angular + REST Api.
I have read most of the articles here none of them had problem which i have come across;
Angular Cookies works fine on localhost, when i uploaded it to server it's not working as it should .
on lading page i have few fields which user selects and these information stored inside cookie as it hits search button navigates to Search page and tries to get information from cookies but fails to get information which user has stored , i am getting default values .
I have created small service code snippet.
.service('Filter',['$cookieStore','Search',function($cookieStore,Search){
return {
get: function(){
return (angular.isDefined($cookieStore.get('filterParams')))?$cookieStore.get('filterParams'):Search;
},
set: function(value){
$cookieStore.put('filterParams',value);
},
clear: function(){
$cookieStore.remove('filterParams');
}
}
}])