Home
Using Smart NgRX
Demo Walkthrough
API
@smarttools/smart-ngrx / Class

EffectService

Generic types:T

This is the abstract class that all services the Effects use must implement.

Methods

abstract

add()

Sends a new row to the server

Presentation
abstract add(row: T): Observable<T[]>;
Parameters
NameTypeDescription
row
T
Returns
Observable<T[]>
Overload #1

Sends a new row to the server

Presentation
abstract add(row: T): Observable<T[]>;
Parameters
NameTypeDescription
row
T
Returns
Observable<T[]>
abstract

delete()

Deletes the row represented by the id from the server

Presentation
abstract delete(id: string): Observable<void>;
Parameters
NameTypeDescription
id
string
Returns
Observable<void>
Overload #1

Deletes the row represented by the id from the server

Presentation
abstract delete(id: string): Observable<void>;
Parameters
NameTypeDescription
id
string
Returns
Observable<void>
abstract

loadByIds()

Loads the rows represented by the array of ids passed in from the server

Presentation
abstract loadByIds(ids: string[]): Observable<T[]>;
Parameters
NameTypeDescription
ids
string[]
Returns
Observable<T[]>
Overload #1

Loads the rows represented by the array of ids passed in from the server

Presentation
abstract loadByIds(ids: string[]): Observable<T[]>;
Parameters
NameTypeDescription
ids
string[]
Returns
Observable<T[]>
abstract

loadByIndexes()

Loads the rows represented by the array of ids passed in from the server

Presentation
abstract loadByIndexes(parentId: string, childField: string, startIndex: number, length: number): Observable<PartialArrayDefinition>;
Parameters
NameTypeDescription
parentId
string

the id of the parent row

childField
string
startIndex
number

the index to start loading from

length
number

the number of rows to load

Returns
Observable<PartialArrayDefinition> -

the virtual array contents

Overload #1

Loads the rows represented by the array of ids passed in from the server

Presentation
abstract loadByIndexes(parentId: string, childField: string, startIndex: number, length: number): Observable<PartialArrayDefinition>;
Parameters
NameTypeDescription
parentId
string

the id of the parent row

childField
string
startIndex
number

the index to start loading from

length
number

the number of rows to load

Returns
Observable<PartialArrayDefinition> -

the virtual array contents

abstract

update()

Sends the updated row in the store to the server.

Presentation
abstract update(newRow: T): Observable<T[]>;
Parameters
NameTypeDescription
newRow
T
Returns
Observable<T[]>
Overload #1

Sends the updated row in the store to the server.

Presentation
abstract update(newRow: T): Observable<T[]>;
Parameters
NameTypeDescription
newRow
T
Returns
Observable<T[]>