SmartEntityDefinition
Generic types: | Row |
This is the interface that is used to define the entity for the provideSmartFeatureEntities provider function
Properties
Name | Type | Description |
---|---|---|
effectServiceToken |
| This is the service token related to the service the effect for this entity should call to do CRUD operations against the backend. |
entityAdapter | EntityAdapter< | Supply your own entityAdapter if you are not using ID as the primary key. |
entityName | string | The entity name that you'd usually use in the reducer object you'd use in StoreModule.forFeature(featureName, reducer) OR the name you'd use in provideState(featureName, reducer) We also use this name along with the feature as the Source field in actions but this should not matter to you because you'll either be using actions we've created or using your own actions for your specific purposes. |
isInitialRow | boolean | undefined | If this is true, the assumption is that this is the top level row that has an ID and child fields that hold the IDs of the children. There can be multiple top level rows and each should have at least one child field for it to be useful. When this is true, the loadById action will be fired with one element of value '1' the effectService will be called with this array where you can make a call to the backend to get the IDs for the child fields. |
markAndDelete | Partial< | The |
Methods
defaultRow() | |||||||||
---|---|---|---|---|---|---|---|---|---|
The static function that returns a default row for the entity when it does not yet exist in the store. | |||||||||
Presentation
| |||||||||
Parameters
ReturnsRow |