import { Injectable, Inject} from '@angular/core'; import { Observable } from 'rxjs'; import {LocalStorageService} from 'ngx-webstorage'; import 'rxjs/add/operator/map'; import { DOCUMENT } from '@angular/platform-browser'; @Injectable() export class GlobalVariables { constructor (private storage : LocalStorageService, @Inject(DOCUMENT) private document) { } getFormHasPaging() : boolean{ return this.storage.retrieve('form-paging-flag'); } setFormHasPaging(formHasPaging : boolean){ this.storage.store('form-paging-flag',formHasPaging); } }