O'Reilly logo

Angular UI Development with PrimeNG by Oleg Varaksin, Sudheer Jonna

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CRUD application with @ngrx/store

For a practical example, we will reuse the same CRUD sample implementation from the section CRUD sample implementation with DataTable. Start off by adding the ngrx dependencies for a Redux-based application:

npm install @ngrx/store @ngrx/core --save

First of all, we need to define a shape for the store. In real applications, most likely available employees and currently selected employee might be shared across several components. Hence the store could be defined as follows:

export interface AppStore {  employees: Employee[];  selectedEmployee: Employee;}

Next, we need to define actions which consist of types and optional payloads.

The best practice is to create Action Creator Services encapsulating associated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required