Angular CRUD Example with .NET 10 Web API (and 6 Errors)
Last updated: October 26, 2026 · Tested with Angular 22.2.3 (CLI 22.2.4, TypeScript 6.0.3), Bootstrap 5.3.8, Node 24.21.0, .NET 10.0.12 (SDK 10.0.401), Microsoft.EntityFrameworkCore.Sqlite 10.0.14, Chrome, Windows 11
Short answer: an Angular CRUD app talks to an ASP.NET Core Web API through one service that wraps HttpClient (get, post, put, delete). The API needs four endpoints and a CORS policy for http://localhost:4200. One reactive form handles both “add” and “edit”, with the :id route parameter bound to a component input. Below is the complete code I ran with Angular 22 and .NET 10, the real responses, and the six errors I hit while building it, each with the exact message and the fix.
| You see this | Cause | Fix |
|---|---|---|
blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present | The API has no CORS policy for the Angular origin | AddCors + UseCors with http://localhost:4200 |
Redirect is not allowed for a preflight request (CORS is configured) | UseHttpsRedirection redirects the http call to https | Call the API’s https URL |
NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form' | ReactiveFormsModule missing from the component’s imports | Import it in the standalone component |
| Edit page shows “Add employee” and Save creates a duplicate | withComponentInputBinding() missing, so the id input stays empty | Add it to provideRouter |
A merge conflicted on path "/src/app/employees/employee.ts" | ng g interface and ng g service both want employee.ts | ng g service ... --type=service |
TS2349: This expression is not callable on .subscribe | A ternary of Observable<Employee> and Observable<void> | Type the variable as Observable<unknown> |
What You Build
An employee list with Add, Edit and Delete buttons, and one form for adding and editing. The Angular app runs on http://localhost:4200, the API on http://localhost:5204, and the data sits in a SQLite file, so you don’t need SQL Server to follow along (switching to SQL Server is one line in Program.cs).
How I Tested It
I created both projects with the current CLIs (ng new and dotnet new webapi), ran the API and ng serve side by side, and used the app in Chrome: loaded the list, submitted an empty form, added, edited and deleted an employee, opened an edit URL for an id that doesn’t exist, and sent an invalid email to check that server-side validation errors appear in the form. API responses below come from curl; browser errors are copied from the Chrome console. Each of the six errors was reproduced by putting that one mistake back into the working code.
Step 1: Create the ASP.NET Core Web API
dotnet new webapi -o Api
cd Api
dotnet add package Microsoft.EntityFrameworkCore.Sqlite --version 10.0.14
The .NET 10 webapi template creates a minimal API (add --use-controllers if you prefer controllers; the Angular side doesn’t change). Replace Program.cs with this:
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOpenApi();
builder.Services.AddDbContext<EmployeeDb>(o => o.UseSqlite("Data Source=employees.db"));
builder.Services.AddValidation();
builder.Services.AddCors(o => o.AddPolicy("angular", p => p
.WithOrigins("http://localhost:4200")
.AllowAnyHeader()
.AllowAnyMethod()));
var app = builder.Build();
using (var scope = app.Services.CreateScope())
{
scope.ServiceProvider.GetRequiredService<EmployeeDb>().Database.EnsureCreated();
}
if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
}
app.UseCors("angular");
var api = app.MapGroup("/api/employees");
api.MapGet("/", async (EmployeeDb db) =>
await db.Employees.AsNoTracking().OrderBy(e => e.Id).ToListAsync());
api.MapGet("/{id:int}", async (int id, EmployeeDb db) =>
await db.Employees.FindAsync(id) is { } e ? Results.Ok(e) : Results.NotFound());
api.MapPost("/", async (EmployeeInput input, EmployeeDb db) =>
{
var e = new Employee();
input.CopyTo(e);
db.Employees.Add(e);
await db.SaveChangesAsync();
return Results.Created($"/api/employees/{e.Id}", e);
});
api.MapPut("/{id:int}", async (int id, EmployeeInput input, EmployeeDb db) =>
{
if (await db.Employees.FindAsync(id) is not { } e) return Results.NotFound();
input.CopyTo(e);
await db.SaveChangesAsync();
return Results.NoContent();
});
api.MapDelete("/{id:int}", async (int id, EmployeeDb db) =>
await db.Employees.Where(e => e.Id == id).ExecuteDeleteAsync() == 1
? Results.NoContent()
: Results.NotFound());
app.Run();
public class Employee
{
public int Id { get; set; }
public string Name { get; set; } = "";
public string Email { get; set; } = "";
public string Department { get; set; } = "";
public decimal Salary { get; set; }
}
public record EmployeeInput(
[Required, StringLength(100)] string Name,
[Required, EmailAddress] string Email,
[Required] string Department,
[Range(0, 1_000_000)] decimal Salary)
{
public void CopyTo(Employee e)
{
e.Name = Name;
e.Email = Email;
e.Department = Department;
e.Salary = Salary;
}
}
public class EmployeeDb(DbContextOptions<EmployeeDb> options) : DbContext(options)
{
public DbSet<Employee> Employees => Set<Employee>();
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Employee>().Property(e => e.Salary).HasConversion<double>();
modelBuilder.Entity<Employee>().HasData(
new Employee { Id = 1, Name = "Asha Patel", Email = "asha@example.com", Department = "Engineering", Salary = 85000 },
new Employee { Id = 2, Name = "Tom Becker", Email = "tom@example.com", Department = "Sales", Salary = 62000 });
}
}
Things worth knowing about this file:
AddValidation()is new in .NET 10. It makes minimal APIs check the DataAnnotations onEmployeeInputand return a 400 with the errors, without any extra code in the endpoints.- The API accepts
EmployeeInput(noId), so a client can’t set or change an id through the body. WithOrigins("http://localhost:4200")is the Angular dev server. Without it, error 1 below.- The template’s
app.UseHttpsRedirection()line is gone on purpose. Error 2 shows what it does to the Angular calls. HasConversion<double>()is there because SQLite has no decimal type; with SQL Server you don’t need it.
Start it with dotnet run (it uses the first profile in launchSettings.json, http://localhost:5204; your port may differ, so check the console output).
Step 2: Check the API Before Writing Any Angular
If the API doesn’t work with curl, it won’t work from Angular either, and the browser hides most of the details. Real output:
$ curl http://localhost:5204/api/employees
[{"id":1,"name":"Asha Patel","email":"asha@example.com","department":"Engineering","salary":85000},{"id":2,"name":"Tom Becker","email":"tom@example.com","department":"Sales","salary":62000}]
$ curl -i -X POST http://localhost:5204/api/employees -H "Content-Type: application/json" -d '{"name":"Lena Fischer","email":"lena@example.com","department":"HR","salary":58000}'
HTTP/1.1 201 Created
Location: /api/employees/3
{"id":3,"name":"Lena Fischer","email":"lena@example.com","department":"HR","salary":58000}
$ curl -i -X POST http://localhost:5204/api/employees -H "Content-Type: application/json" -d '{"name":"","email":"not-an-email","department":"HR","salary":-5}'
HTTP/1.1 400 Bad Request
{"title":"One or more validation errors occurred.","errors":{"Name":["The Name field is required."],"Email":["The Email field is not a valid e-mail address."],"Salary":["The field Salary must be between 0 and 1000000."]}}
$ curl -i -X PUT http://localhost:5204/api/employees/3 ...
HTTP/1.1 204 No Content
$ curl -i -X DELETE http://localhost:5204/api/employees/3
HTTP/1.1 204 No Content
$ curl -i http://localhost:5204/api/employees/3
HTTP/1.1 404 Not Found
Note the shape of the 400: errors is an object of field name to messages, and the field names are PascalCase (Name, not name). The form below shows those messages as they are, so the casing doesn’t matter there.
Step 3: Create the Angular Project
npx @angular/cli@22 new employee-app --defaults --style=css --ssr=false
cd employee-app
npm install bootstrap@5.3.8
npx ng generate environments
npx ng generate interface employees/employee
npx ng generate service employees/employee --type=service
npx ng generate component employees/employee-list
npx ng generate component employees/employee-form
Angular 20 and later generate file names without the type suffix (employee-list.ts, not employee-list.component.ts). That is why the service needs --type=service: without it, it would also be called employee.ts and clash with the interface (error 5).
Add Bootstrap to the styles array in angular.json:
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
]
With the full Bootstrap CSS, ng build warns bundle initial exceeded maximum budget. Budget 500.00 kB was not met by 35.38 kB. It is a warning, not an error; raise the budget in angular.json or import only the Bootstrap parts you use.
Step 4: Model and API URL
src/app/employees/employee.ts:
export interface Employee {
id: number;
name: string;
email: string;
department: string;
salary: number;
}
export type EmployeeInput = Omit<Employee, 'id'>;
The property names are camelCase because ASP.NET Core serializes JSON in camelCase by default, so the interface matches the API without any mapping.
src/environments/environment.development.ts (used by ng serve):
export const environment = {
apiUrl: 'http://localhost:5204/api/employees',
};
src/environments/environment.ts (used by ng build):
export const environment = {
apiUrl: '/api/employees',
};
In production the Angular files are usually served from the same site as the API, so a relative URL works and no CORS is needed there.
Step 5: The Employee Service
src/app/employees/employee.service.ts:
import { HttpClient } from '@angular/common/http';
import { inject, Service } from '@angular/core';
import { environment } from '../../environments/environment';
import { Employee, EmployeeInput } from './employee';
@Service()
export class EmployeeService {
private readonly http = inject(HttpClient);
private readonly url = environment.apiUrl;
getAll() {
return this.http.get<Employee[]>(this.url);
}
get(id: number) {
return this.http.get<Employee>(`${this.url}/${id}`);
}
create(employee: EmployeeInput) {
return this.http.post<Employee>(this.url, employee);
}
update(id: number, employee: EmployeeInput) {
return this.http.put<void>(`${this.url}/${id}`, employee);
}
delete(id: number) {
return this.http.delete<void>(`${this.url}/${id}`);
}
}
@Service() is what Angular 22’s CLI generates for a new service. It makes the class available for injection everywhere, like @Injectable({ providedIn: 'root' }) did; on older Angular versions use that instead. Every method returns an Observable, and nothing is sent until something subscribes.
Step 6: App Config and Routes
src/app/app.config.ts:
import { ApplicationConfig, provideBrowserGlobalErrorListeners } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideRouter, withComponentInputBinding } from '@angular/router';
import { routes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideHttpClient(),
provideRouter(routes, withComponentInputBinding()),
],
};
withComponentInputBinding() copies route parameters into component inputs with the same name, so the :id in employees/:id/edit arrives in the form’s id input. Leave it out and editing silently turns into adding (error 4).
About provideHttpClient(): in Angular 22 it is optional. I removed it and the app still loaded the list, because HttpClient is now provided in the root injector and uses the fetch backend by default. Keep the line anyway: it is where interceptors go (provideHttpClient(withInterceptors([...]))), and older Angular versions need it.
src/app/app.routes.ts:
import { Routes } from '@angular/router';
import { EmployeeForm } from './employees/employee-form/employee-form';
import { EmployeeList } from './employees/employee-list/employee-list';
export const routes: Routes = [
{ path: '', redirectTo: 'employees', pathMatch: 'full' },
{ path: 'employees', component: EmployeeList },
{ path: 'employees/new', component: EmployeeForm },
{ path: 'employees/:id/edit', component: EmployeeForm },
];
src/app/app.ts and app.html, a navbar and the router outlet:
import { Component } from '@angular/core';
import { RouterLink, RouterOutlet } from '@angular/router';
@Component({
selector: 'app-root',
imports: [RouterOutlet, RouterLink],
templateUrl: './app.html',
})
export class App {}
<nav class="navbar navbar-dark bg-dark mb-4">
<div class="container">
<a class="navbar-brand" routerLink="/employees">Employees</a>
</div>
</nav>
<main class="container">
<router-outlet />
</main>
Step 7: List and Delete (Read, Delete)
src/app/employees/employee-list/employee-list.ts:
import { CurrencyPipe } from '@angular/common';
import { Component, inject, OnInit, signal } from '@angular/core';
import { RouterLink } from '@angular/router';
import { Employee } from '../employee';
import { EmployeeService } from '../employee.service';
@Component({
selector: 'app-employee-list',
imports: [RouterLink, CurrencyPipe],
templateUrl: './employee-list.html',
})
export class EmployeeList implements OnInit {
private readonly service = inject(EmployeeService);
protected readonly employees = signal<Employee[]>([]);
protected readonly error = signal('');
ngOnInit() {
this.service.getAll().subscribe({
next: list => this.employees.set(list),
error: () => this.error.set('Could not load employees. Is the API running?'),
});
}
delete(employee: Employee) {
if (!confirm(`Delete ${employee.name}?`)) return;
this.service.delete(employee.id).subscribe({
next: () => this.employees.update(list => list.filter(e => e.id !== employee.id)),
error: () => this.error.set(`Could not delete ${employee.name}.`),
});
}
}
employee-list.html:
<div class="d-flex justify-content-between align-items-center mb-3">
<h1 class="h3 m-0">Employees</h1>
<a class="btn btn-primary" routerLink="/employees/new">Add employee</a>
</div>
@if (error()) {
<div class="alert alert-danger">{{ error() }}</div>
}
<table class="table table-striped align-middle">
<thead>
<tr><th>Name</th><th>Email</th><th>Department</th><th class="text-end">Salary</th><th></th></tr>
</thead>
<tbody>
@for (e of employees(); track e.id) {
<tr>
<td>{{ e.name }}</td>
<td>{{ e.email }}</td>
<td>{{ e.department }}</td>
<td class="text-end">{{ e.salary | currency }}</td>
<td class="text-end">
<a class="btn btn-sm btn-outline-secondary me-2" [routerLink]="['/employees', e.id, 'edit']">Edit</a>
<button class="btn btn-sm btn-outline-danger" (click)="delete(e)">Delete</button>
</td>
</tr>
} @empty {
<tr><td colspan="5" class="text-center text-muted">No employees yet.</td></tr>
}
</tbody>
</table>
After a successful DELETE the row is removed from the signal instead of reloading the whole list. @for needs a track expression; the id is the natural one. The @empty block shows when the list is empty, which is also what you see when the request fails, so the error message above the table matters.
Step 8: One Form for Add and Edit (Create, Update)
src/app/employees/employee-form/employee-form.ts:
import { HttpErrorResponse } from '@angular/common/http';
import { Component, inject, input, OnInit, signal } from '@angular/core';
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
import { Router, RouterLink } from '@angular/router';
import { Observable } from 'rxjs';
import { EmployeeService } from '../employee.service';
@Component({
selector: 'app-employee-form',
imports: [ReactiveFormsModule, RouterLink],
templateUrl: './employee-form.html',
})
export class EmployeeForm implements OnInit {
private readonly service = inject(EmployeeService);
private readonly router = inject(Router);
// Filled from the :id route parameter by withComponentInputBinding()
readonly id = input<string>();
protected readonly serverErrors = signal<string[]>([]);
protected readonly form = inject(FormBuilder).nonNullable.group({
name: ['', [Validators.required, Validators.maxLength(100)]],
email: ['', [Validators.required, Validators.email]],
department: ['', Validators.required],
salary: [0, [Validators.required, Validators.min(0)]],
});
ngOnInit() {
const id = this.id();
if (id) {
this.service.get(+id).subscribe({
next: employee => this.form.patchValue(employee),
error: (err: HttpErrorResponse) =>
this.serverErrors.set([err.status === 404 ? `Employee ${id} was not found.` : 'Could not load the employee.']),
});
}
}
save() {
if (this.form.invalid) {
this.form.markAllAsTouched();
return;
}
const id = this.id();
const request: Observable<unknown> = id
? this.service.update(+id, this.form.getRawValue())
: this.service.create(this.form.getRawValue());
request.subscribe({
next: () => this.router.navigate(['/employees']),
error: (err: HttpErrorResponse) =>
this.serverErrors.set(
err.status === 400 && err.error?.errors
? Object.values<string[]>(err.error.errors).flat()
: [`Save failed (${err.status}).`]),
});
}
}
employee-form.html:
<h1 class="h3 mb-3">{{ id() ? 'Edit employee' : 'Add employee' }}</h1>
@for (message of serverErrors(); track message) {
<div class="alert alert-danger py-2">{{ message }}</div>
}
<form [formGroup]="form" (ngSubmit)="save()" class="col-md-6">
<div class="mb-3">
<label class="form-label" for="name">Name</label>
<input id="name" class="form-control" formControlName="name">
@if (form.controls.name.touched && form.controls.name.invalid) {
<div class="text-danger small">Name is required (max 100 characters).</div>
}
</div>
<div class="mb-3">
<label class="form-label" for="email">Email</label>
<input id="email" type="email" class="form-control" formControlName="email">
@if (form.controls.email.touched && form.controls.email.invalid) {
<div class="text-danger small">Enter a valid email address.</div>
}
</div>
<div class="mb-3">
<label class="form-label" for="department">Department</label>
<input id="department" class="form-control" formControlName="department">
@if (form.controls.department.touched && form.controls.department.invalid) {
<div class="text-danger small">Department is required.</div>
}
</div>
<div class="mb-3">
<label class="form-label" for="salary">Salary</label>
<input id="salary" type="number" class="form-control" formControlName="salary">
@if (form.controls.salary.touched && form.controls.salary.invalid) {
<div class="text-danger small">Enter a salary of 0 or more.</div>
}
</div>
<button type="submit" class="btn btn-primary me-2">Save</button>
<a class="btn btn-outline-secondary" routerLink="/employees">Cancel</a>
</form>
How it behaves, from my run in Chrome:
- Save on an empty form: no request is sent; all four field messages appear (
markAllAsTouched()is what makes them visible). - Add:
POST→ 201, back to the list with the new row. - Edit (
/employees/4/edit): the form is pre-filled fromGET /api/employees/4; changing the department and saving sendsPUT→ 204. - An id that doesn’t exist (
/employees/3/editafter deleting 3): “Employee 3 was not found.” instead of an empty form. - A server-side 400 (I removed the client email check to force one): “The Email field is not a valid e-mail address.” above the form.
nonNullable keeps the form values typed as string and number, so getRawValue() matches EmployeeInput without casts. The Observable<unknown> annotation on request is needed; error 6 shows why.
Step 9: Run Both
# terminal 1
cd Api
dotnet run
# terminal 2
cd employee-app
npx ng serve
Open http://localhost:4200. If the list says “Could not load employees. Is the API running?”, open the browser console (F12) before changing any code: the real reason is there, and it is usually error 1 or 2.
The 6 Errors in Detail
1. “No ‘Access-Control-Allow-Origin’ header is present on the requested resource”
With AddCors and UseCors removed from the API, the list page shows the error message and Chrome’s console has:
Access to fetch at 'http://localhost:5204/api/employees' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Failed to load resource: net::ERR_FAILED
The API itself answered normally: curl with the same Origin header gets 200 OK, just without an Access-Control-Allow-Origin header. The browser refused to give the response to Angular, because port 4200 and port 5204 are different origins. Fix it on the API side with the AddCors policy and app.UseCors("angular") from Step 1. An alternative for development only is the Angular dev-server proxy (proxy.conf.json), which makes the calls same-origin.
2. “Redirect is not allowed for a preflight request”, with CORS configured
This one is confusing because the CORS policy is in place. I put the template’s app.UseHttpsRedirection() back and started the API with the https profile (dotnet run --launch-profile https, or the “https” choice in Visual Studio). Angular still called http://localhost:5204, and the API answered every request with a redirect:
HTTP/1.1 307 Temporary Redirect
Location: https://localhost:7133/api/employees
Chrome’s console, for the list (GET) and for a save (POST, which sends a preflight first):
Access to fetch at 'http://localhost:5204/api/employees' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to fetch at 'http://localhost:5204/api/employees' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
Moving UseCors above UseHttpsRedirection does not fix it. I tried: the redirect then carries the CORS header, but the browser still blocks the request after following the redirect to https (... (redirected from 'http://localhost:5204/api/employees') ... has been blocked by CORS policy). What works is calling the https address directly: with apiUrl: 'https://localhost:7133/api/employees' GET returned 200 and POST 201. That needs a trusted development certificate (dotnet dev-certs https --trust). Or, as in this tutorial, run the API on http in development and don’t redirect.
3. NG8002: Can’t bind to ‘formGroup’ since it isn’t a known property of ‘form’
With ReactiveFormsModule removed from the form component’s imports, ng build fails:
X [ERROR] NG8002: Can't bind to 'formGroup' since it isn't a known property of 'form'. Find more at https://next.angular.dev/errors/NG8002 [plugin angular-compiler]
src/app/employees/employee-form/employee-form.html:7:6:
7 │ <form [formGroup]="form" (ngSubmit)="save()" class="col-md-6">
╵ ~~~~~~~~~~~~~~~~~~
Error occurs in the template of component EmployeeForm.
Standalone components (the default since Angular 19) only see what they import themselves. Old tutorials, including the Angular 14 version of this one, import ReactiveFormsModule once in app.module.ts; there is no AppModule any more, so it goes into each component that uses [formGroup]. The same goes for RouterLink and pipes like CurrencyPipe.
4. The edit page says “Add employee” and Save creates a duplicate
No error at all, which makes this the most expensive mistake on the list. With provideRouter(routes) instead of provideRouter(routes, withComponentInputBinding()), /employees/3/edit rendered the heading “Add employee” with empty fields, and no GET /api/employees/3 was sent. I filled in the form and pressed Save. The network tab showed POST /api/employees → 201 Created, and the list then had two Lena Fischer rows: the original (HR, $58,000.00) and a new one (People, $0.00).
The id input only receives the route parameter when input binding is on. Add withComponentInputBinding(), or read the parameter yourself with inject(ActivatedRoute).snapshot.paramMap.get('id').
5. A merge conflicted on path “/src/app/employees/employee.ts”
> ng g interface employees/employee
CREATE src/app/employees/employee.ts (32 bytes)
> ng g service employees/employee
A merge conflicted on path "/src/app/employees/employee.ts".
Since Angular 20 the CLI drops the .service suffix by default, so both commands want the same file. Use --type=service (gives employee.service.ts) or a different name such as employee-api.
6. TS2349: This expression is not callable
My first version of save() picked the request with a ternary and subscribed to it:
const request = id
? this.service.update(+id, this.form.getRawValue())
: this.service.create(this.form.getRawValue());
request.subscribe({ ... });
X [ERROR] TS2349: This expression is not callable.
Each member of the union type '{ (observerOrNext?: Partial<Observer<Employee>> | ((value: Employee) => void) | undefined): Subscription; ... } | { ...; }' has signatures, but none of those signatures are compatible with each other.
update returns Observable<void> and create returns Observable<Employee>, and TypeScript can’t call subscribe on the union of the two. Since the code only cares whether the request succeeded, const request: Observable<unknown> = ... fixes it.
What Changed Since the Angular 14 Version
- No
AppModule: standalone components,app.config.tsandapp.routes.ts. inject()instead of constructor parameters, signals instead of plain fields for the list and errors.@if/@forinstead of*ngIf/*ngFor.- Typed reactive forms (
nonNullable), one component for add and edit. - Route parameters as component inputs instead of subscribing to
ActivatedRoute. - On the API side: a minimal API with built-in validation (
AddValidation()) instead of a controller project, and SQLite instead of SQL Server for the demo.
Checklist
- Test the API with
curlfirst: 200 list, 201 +Locationon POST, 204 on PUT and DELETE, 404 for a missing id, 400 with errors. - CORS policy for
http://localhost:4200in development; same-origin (relative URL) in production. - Angular calls the same scheme the API listens on: no http-to-https redirect between them.
withComponentInputBinding()if a component reads route parameters through inputs.ReactiveFormsModule,RouterLinkand pipes imported in every standalone component that uses them.- Show an error when a request fails: an empty table and a failed request look the same otherwise.
- Deploying the Angular app? Read Angular 404 on page refresh after deployment before the first refresh on
/employees/1/editfails.
Official docs: Angular HTTP client · Reactive forms · Enable CORS in ASP.NET Core.
Related: ASP.NET Core Web API tutorial (.NET 10) · Minimal APIs · Angular AuthGuard: functional route guards · Angular date pipe · Angular form validation · all ASP.NET Core tutorials
The step-by-step structure makes this Angular CRUD example easy to follow, particularly because it connects the Angular frontend with an ASP.NET Core 6 Web API and SQL Server backend. The separation between database/API setup and Angular CLI configuration also gives a clear picture of how the different layers work together in a full-stack application. A ASP.NET Core Angular Full Stack Online Course is closely aligned with this kind of development workflow.
I also like that the tutorial focuses on the complete CRUD cycle rather than only demonstrating individual Angular features. Using Bootstrap for the interface while communicating with a Web API provides a practical foundation for building responsive business applications. The frontend development aspects described here make Angular Online Course particularly relevant for developers who want to strengthen their Angular skills.
The article also demonstrates how npm packages such as Bootstrap and Bootstrap Icons can be integrated into an Angular project to create a responsive user interface. Understanding how frontend components connect with backend CRUD operations is valuable for developers pursuing a Dot Net Full Stack Developer Course.