import { Injectable } from '@angular/core' ; import { PreferencesDAO } from '../dao/preferences' ; class @ Injectable ( ) export class PreferencesManager { public constructor ( private dao ) { } template T param { string } key returns { Promise < T > } public getKey < T > ( key ) { return this . dao . getKey < T > ( key ) ; } param { string } key param { * } value returns { Promise < void > } public setKey ( key , value ) { return this . dao . setKey ( key , value ) ; } }