A lightweight, production-ready pattern for binding Next.js server data to a Syncfusion Angular Grid. The sample supports complete CRUD (Create, Read, Update, Delete), server-side filtering, searching, sorting, and paging using Syncfusion DataManager.
- Syncfusion Angular Grid: Built-in search, filter, sort, and paging capabilities
- Complete CRUD Operations: Add, edit, delete, and update records directly from the grid
- Custom-Binding: Full control over grid data operations (search, filter, sort, page and CRUD actions)
-
Node.js: LTS version (v20.x or later)
-
npm/yarn: For package management.
-
Angular CLI: For creating and serving the Angular client application
-
Clone the repository
git clone <repository-url> cd Connecting_to_Next_js_server
-
Run the application
Run the Next.js server
cd next_js_server
npm run devRun the Angular client
cd angular_client
ng serve-
Open the application
The server runs at http://localhost:3000 Navigate to the local URL displayed in the terminal (typically
http://localhost:3000).
Security Note: For production environments, store sensitive credentials using:
-
Environment variables
-
Secure storage solutions (e.g., Azure Key Vault, AWS Secrets Manager)
| File/Folder | Purpose |
|---|---|
next_js_server/app/api/health_care/route.ts |
Server-side API route handling grid data operations |
next_js_server/data/health_care_Entities.ts |
Entity model containing the data |
angular_client/src/app/doctors/doctors.ts |
Contains the Grid configuration |
angular_client/src/app/patients/patients.ts |
Dynamic route page |
- Click the Add button in the toolbar
- Fill in the form fields (Doctor ID, Name, Specialty etc.)
- Click Update button in the toolbar to save the record.
- Select a row in the grid
- Click the Edit button in the toolbar
- Modify the required fields
- Click Update to save changes
- Select a row in the grid
- Click the Delete button in the toolbar
- Confirm the deletion
- Use the Search box in the toolbar
- Enter keywords to filter records (searches across all columns)
- Click the filter icon in any column header
- Select filter criteria (equals, contains, greater than, etc.)
- Click Filter to apply
- Click the column header to sort ascending
- Click again to sort descending
- Click the View Appointment Details button in the template column of the Grid.
- This will navigate to the appointment details page.
The user guide provides detailed directions in a clear, step-by-step format.