Abstract
Optional
config: StoreConfigProtected
_queryThe configuration for the store.
Primary index for the stores elements.
The element entries that are keyed by an id generated on the server.
Protected
notifyCreate notifications that broacast the entire set of entries.
Protected
notifyCreate notifications that broacast store or slice delta state changes.
Protected
notifyNotifies observers of the store query.
An Observable<E[]> reference to the entities in the store or Slice instance.
The current guid key for the EStore instance.
this.config.guidKey;
The current id key for the EStore instance.
this.config.idKey;
A snapshot of the query state.
Sets the current query state and notifies observers.
Returns true if the entries contain the identified instance.
Either an instance of type E
or a guid
identifying the instance.
true if the instance identified by the guid exists, false otherwise.
<pre>
let contains:boolean = source.contains(guid);
</pre>
Returns true if the entries contain the identified instance.
Either an instance of type E
or a id
identifying the instance.
true if the instance identified by the id
exists, false otherwise.
<pre>
let contains:boolean = source.contains(guid);
</pre>
Returns the number of entries contained.
Optional
p: Predicate<E>The predicate to apply in order to filter the count
Returns a snapshot of the number of entries contained in the store.
Optional
p: Predicate<E>The predicate to apply in order to filter the count
Protected
notifyCall all the notifiers at once.
Observe store state changes.
Optional
sort: ((a, b) => number)Optional sorting function yielding a sorted observable.
let todos$ = source.observe();
//or with a sort by title function
let todos$ = source.observe((a, b)=>(a.title > b.title ? -1 : 1));
Snapshot of the entries that match the predicate.
The predicate used to query for the selection.
A snapshot array containing the entities that match the predicate.
let todos:Todo[]=store.select(todo=>todo.title.length>100);
Generated using TypeDoc
The current query state.