localStorage.setItem('dataSource', this.dataSource.length); // setting console.log(localStorage.getItem('dataSource')); // getting