File

src/app/services/persistence/persistence.service.ts

Description

A persistence service.

Extends

Storage

Index

Properties
Methods

Constructor

constructor(entitiesModel: EntitiesModel)

Constructs the persistence service. ~constructor

Parameters :
Name Type Optional Description
entitiesModel EntitiesModel No

The entities model injected dependency.

Methods

Public getToggle
getToggle(key: string)

Retrieves the toggle state of a heading section from persistent storage.

Parameters :
Name Type Optional Description
key string No

The section to process.

Returns : any

The toggle state retrieved.

Public getToggleValue
getToggleValue(key: string)

Whether toggle state of a heading section is collapsed.

Parameters :
Name Type Optional Description
key string No

The section to process.

Returns : boolean

The toggle state retrieved.

Public restoreToggle
restoreToggle(document: Document, typeName: string, contentName?: string)

Restores the toggle state of a heading section.

Parameters :
Name Type Optional Description
document Document No

The document to search for a content element.

typeName string No

The section to process.

contentName string Yes

The content name to use.

Returns : void
Public restoreToggleAllSections
restoreToggleAllSections()

Restores the toggle state of all heading sections.

Returns : void
Public saveToggle
saveToggle(event: MouseEvent)

Saves the toggle state of a heading section.

Parameters :
Name Type Optional Description
event MouseEvent No

The click event initiating the save.

Returns : void

Properties

Public Readonly entitiesModel
Type : EntitiesModel
The entities model injected dependency.

results matching ""

    No results matching ""