This application uses a .NET Core 8 API for the backend and an Angular 18 application for the frontend. The backend data is stored in a JSON file, and the application includes server-side pagination to handle large datasets efficiently.
This project was generated with Angular CLI version 18.0.3.
This application has separate repositories for the back end and front end.
- Backend (API): [https://github.com/krutikshah24/CMS.API]
- Frontend (UI): [https://github.com/krutikshah24/CMS.UI]
Clone each repository separately and follow the setup instructions below for each project.
To set up this project, you must configure both the backend and frontend environments.
-
Install Node.js and Angular CLI:
- Download and install Node.js (LTS version recommended).
- Install the Angular CLI globally by running:
npm install -g @angular/cli
- Confirm the installation by running:
ng version
-
Navigate to the Angular Project Directory:
- Move into the
CMS.UI
directory where the Angular code is located.
- Move into the
-
Install Dependencies:
- Install the required npm packages by running:
npm install
- Install the required npm packages by running:
- Start the Angular Application:
- Run the Angular frontend with the following command:
ng serve
- The application should now be accessible at
http://localhost:4200
. The Angular application will use the backend API to perform CRUD operations.
- Run the Angular frontend with the following command:
- Components:
UserListComponent
: Displays a list of users with pagination controls for easy navigation.UserFormComponent
: Handles user creation and update operations, with form validation for required fields and email format.
- Services:
UserService
: An Angular service that usesHttpClient
to send HTTP requests to the backend API, providing methods for CRUD operations.
- Models:
- A TypeScript interface defines the structure of the
User
model in the frontend, ensuring consistency with the backend data schema.
- A TypeScript interface defines the structure of the
- Pagination:
- The frontend requests data in pages from the backend, enabling server-side pagination for optimized data handling.