rishabhkbakshi / ngrx-app-with-crud

This app will help you to understand the concept of NgRX. You will learn like how to create and use 'actions', 'selectors', 'reducers' and 'effects' with CRUD (Create, Read, Update and Delete) operation, and also you will learn how to write the unit cases in all aspects in an Angular project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NgrxAppWithCrud

This project was generated with Angular CLI version 14.2.12.

This app will help you to understand the concept of NgRX. You will learn how to create and use 'actions', 'selectors', 'reducers' and 'effects' with CRUD (Create, Read, Update and Delete) operation, and also you will learn how to write the unit cases in all aspects in an Angular project.

Features I have added are:

  1. Whenever the user performs add or update operation on a row, after 3 minutes the system will notify the user to perform a new operation (update or delete) on the same by changing the background color to red of the row.
  2. User can sort the timezone of the record
    • India => Sort by Id (default)
    • New York => Sort by Date (ASC)
    • London => Sort by Date (DESC)

Development server

Run ng serve --o or npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Step to run the json-server (task.json will be the file)

  1. Read this article before further steps
  2. run cd .\src\assets\
  3. json-server --watch task.json

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

To see the code-coverage as well. Then run ng test --code-coverage

To run the particular spec.ts file ng test --include=<path of spec.ts file> --watch --code-coverage

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

About

This app will help you to understand the concept of NgRX. You will learn like how to create and use 'actions', 'selectors', 'reducers' and 'effects' with CRUD (Create, Read, Update and Delete) operation, and also you will learn how to write the unit cases in all aspects in an Angular project.


Languages

Language:TypeScript 90.8%Language:HTML 7.0%Language:JavaScript 1.7%Language:SCSS 0.5%