States Registry
As you might have noticed by now, we use state paths to specify a collection.
The PostsState collection can now be access via the path entities.posts
. Retrieving the correct state is handled by the StatesRegistryService.
StatesRegistryService
The service exposes a function called getByPath(path: string)
that lets you retrieve states via their path mapping. The mapping is automatically generated via the name attribute in the decorator options. Nesting is performed by the children array in the decorator options.
Last updated