Question: I have build couple of functions using jquery cookie plugin, I am having issue with making it work cross pages. 

I have set.html page which sets cookies, and show.html which shows pages. Everytime someone views set.html random key value pair is added to the cookie.

When I log the data set.html looks like cookies are set and stored correctly, but when I go to show.html only first key/value is retrieved. I try to use path, which still didn't work.

```
function savePage(ID, name){
  deleteAllCookies();
  $.cookie.json = true;
  var idContainer = ($.cookie('the_cookie_key_3')) || [];
  var idContainerVal = ($.cookie("the_cookie_key_val_3")) || {};
  console.log(typeof idContainer);
  console.log(idContainerVal);
  if (idContainer.indexOf(ID) === -1) { idContainer.push(ID); idContainerVal[ID] = name;}

  $.cookie('the_cookie_key_3', idContainer, { expires: 40});
  $.cookie('the_cookie_key_val_3', idContainerVal, { expires: 40 });
    console.log(idContainerVal);
}

function getSavedPages(){
    $.cookie.json = true;
    var idContainer = ($.cookie('the_cookie_key_val_3')) || {};
    console.log(idContainer);
    return idContainer;
} 

```

Answer: 
I use ng2-file-manager and easy file manager for angular 2

**link:** <https://github.com/jkuri/ng2-file-manager>
Here is an example of angular2 front end and PHP as a backend for [angular2 file manager](https://github.com/bhaskar-bhatt/angular-file-manager)

**Source** : <https://github.com/bhaskar-bhatt/angular-file-manager>

[![enter image description here](https://i.stack.imgur.com/lbpwe.png)](https://i.stack.imgur.com/lbpwe.png)