From the course: Learning NgRx

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Entities to manage record collections

Entities to manage record collections - Angular Tutorial

From the course: Learning NgRx

Start my 1-month free trial

Entities to manage record collections

- [Instructor] In this video, we're going to see how to use entities to facilitate the handling of collections of objects with NgRx. So let's assume for a minute that our application somehow has to manage a list of users with all of the associated create, update, delete operation for that list of users. NgRx has a specific schematic thelatical entity. Let's give it a try to see what this actually does. So I'm going to run a command to generate last place of entities. So using ng generate ngrx schematics as always, we're going to generate an entity code user. And always using the group flag to have everything grouped by feature. So right away nuscli tells us what was generated. We see that actions in model and a reducer were added to our project. So let's take a look at all of these finds. So first I'm going to the actions file. And in the actions we can see that all of the different actions ready to creating, adding users, deleting users were automatically generated for us. So we…

Contents