import { Injectable } from '@angular/core' ; @ Injectable ( ) export class ImageSizeSettingProvider { i ; constructor ( ) { } getSize ( ) { let savedImageSize = JSON . parse ( localStorage . getItem ( 'imageSizeSetting' ) ) ; return savedImageSize ? savedImageSize . scale : 0.4 ; } setSize ( scalePercent ) { localStorage . setItem ( 'imageSizeSetting' , JSON . stringify ( { scale : scalePercent / 100 } ) ) ; } }