declare var store ; declare var _ ; import { Injectable } from 'angular2/core' ; @ Injectable ( ) export class Local { private _exists : Boolean ; constructor ( ) { this . _exists = _ . keys ( store . getAll ( ) ) . length > 0 ; } get exists ( ) : Boolean { return this . _exists ; } getitemsList ( ) { return store . get ( 'itemsList' ) ; } setitemsList ( items ) { store . set ( 'itemsList' , items ) ; } getitemDefaults ( ) { return store . get ( 'itemDefaults' ) ; } setitemDefaults ( itemObj ) { store . set ( 'itemDefaults' , itemObj ) ; } getcontainerDefaults ( ) { return store . get ( 'containerDefaults' ) ; } setcontainerDefaults ( containerObj ) { store . set ( 'containerDefaults' , containerObj ) ; } }