@rosen-group/ngx-onboarding
Version:
Onboarding module for Angular applications
28 lines (27 loc) • 1.2 kB
TypeScript
import { EnabledStatusBaseService } from './enabled-status-base.service';
import { ErrorHandler } from '@angular/core';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
/**
* Stores the enabled status of the onboarding to the local storage
*
* If you want to implement an own service to store the data e.g. in a database you can extend your own service
* from the EnabledStatusBaseService and use the provide feature in your app.module with
* {provide: EnabledStatusBaseService, useClass: YourOwnEnabledStatusService}
*/
export declare class LocalStorageEnabledStatusService extends EnabledStatusBaseService {
private errorHandler;
constructor(errorHandler: ErrorHandler);
/**
* loads the status from the persistent storage
* @returns status (true = enabled, false = disabled)
*/
load(): Observable<boolean>;
/**
* saves the status to localStorage
* @returns success of the operation (true = good, false = failed)
*/
save(enabled: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageEnabledStatusService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageEnabledStatusService>;
}