devto 2026-06-29 원문 보기 ↗
Canonical URL: This article is republished from the original on munonye.com. Read the full six-part series and updated Angular 19 code there.
In this tutorial you'll set up a Friends CRUD application with:
This is Part 1 of 6. The complete roadmap is on munonye.com.
Prerequisites: Node.js 18+, Angular CLI, Java 17+, basic TypeScript and REST fundamentals.
Estimated time: ~45 minutes.
Modern Angular uses standalone components and functional providers — no AppModule required.
npm install -g @angular/cli@latest
ng new friends-ui --routing --style=scss --ssr=false
cd friends-ui
ng serve --port 9002
// main.ts
import { bootstrapApplication } from '@angular/platform-browser';
import { provideRouter } from '@angular/router';
import { provideHttpClient } from '@angular/common/http';
import { AppComponent } from './app/app.component';
import { routes } from './app/app.routes';
bootstrapApplication(AppComponent, {
providers: [provideRouter(routes), provideHttpClient()]
});
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
template: `<router-outlet></router-outlet>`
})
export class AppComponent {}
// src/environments/environment.ts
export const environment = {
production: false,
apiUrl: 'http://localhost:9001/api/friends'
};
import { Injectable, inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { environment } from '../environments/environment';
@Injectable({ providedIn: 'root' })
export class FriendService {
private http = inject(HttpClient);
private base = environment.apiUrl;
getAll() {
return this.http.get<Friend[]>(this.base);
}
}
Create a Spring Boot project with Web, JPA, and H2 dependencies. Add:
FriendController.javaFriend.java (entity)FriendService.javaFriendRepository.javadata.sql for seed dataReference implementation: product-app-spring-api on GitHub
server.port=9001
spring.datasource.url=jdbc:h2:mem:friendsdb
spring.jpa.hibernate.ddl-auto=update
| Part | Topic | Link |
|---|---|---|
| 2 | GET — list records | Part 2 on munonye.com |
| 3 | POST — create | Part 3 |
| 4 | Details view | Part 4 |
| 5 | PUT — edit | Part 5 |
| 6 | DELETE | Part 6 |
Complete guide (all parts): munonye.com/angular-crud-spring-boot-rest-api-complete-guide/
Kindson Munonye — software engineer and technical author.
GitHub · LinkedIn · About · YouTube