title: Angular 2 sessionStorage after session storage set the current value not modified
body: <p>I need some help about a sessionStorage problem.</p>
  
  <p>When I change a value from a dropbox, it changes on the page, but after I click on another page and come back the value is not save. So what I've done:</p>
  
  <pre><code>handleOnItemsPerPage(itemsPerPage) {
  
    sessionStorage.setItem('itemsPerPage', JSON.stringify(itemsPerPage));
  
    this.onFilter.emit({
      items: this.cachedItems,
      field: 'type',
      type: this.selectedCategory,
      query: this.searchQuery,
      itemsPerPage: parseInt(itemsPerPage, 10),
      sortAsc: this.isAscSort,
      page: this.page
    });
  }
  </code></pre>
  
  <p>When I change the value, I save it in session Storage, so when I come back to display it. So in my ngInit:</p>
  
  <pre><code>ngOnInit() {
     this.sessionStorage =  JSON.parse(sessionStorage.getItem('itemsPerPage'));
  }
  </code></pre>
  
  <p>And in html:</p>
  
  <pre><code>&lt;app-pager [pagedItems]="pagedItems"
  [itemsPerPage]="sessionStorage ? sessionStorage : itemsPerPage"
  [page]="page"
  (onPageChange)="handleOnPageChange($event)"
  (onItemsPerPage)="handleOnItemsPerPage($event)"&gt;
  &lt;/app-pager&gt;
  </code></pre>
  
  <p>The problem is that the first time is working, if I change the value and come back on the page it applies the changes, but after I change again the value, it doesn't change to the current value, but the session one.</p>
  
  <p>How exactly to fix this?
  Thank you.</p>