Frontend JavaScript REST API

Complete Angular REST API Tutorial: Connecting and Managing Data

Connect Angular to a REST API: services, TypeScript models, full CRUD with async/await, fetch, and error handling.

Course description

Angular and REST API: Build a Complete App from Scratch

In this course I show you how to connect an Angular application to a real REST API, covering the entire journey: from project setup to inserting, editing, and deleting data. We don’t stop at theory — we start with a ready-made Node.js REST API and build a working, well-structured Angular application step by step.

What You'll Learn

  • Angular project setup with Router Outlet and Bootstrap navbar
  • RouterLink with arrays and dropdown navigation
  • JavaScript Promises: resolve, reject, and async/await with fetch
  • Creating models to type REST responses
  • Angular Service for centralizing HTTP calls
  • FormsModule and ngModel for data entry
  • Error handling and refactoring with guard functions
  • HTTP DELETE and PATCH with fetch and async/await
  • ActivatedRoute and Observable for element detail views

The Practical Project: Event Management

The entire course is built around a concrete event management project. The REST API source code is available on GitHub so you can follow every step locally. Along the way we also cover a UML use case diagram to understand how to analyze requirements before writing code.

Who This Course Is For

Ideal for those who already know the basics of Angular and TypeScript and want to make the leap to real applications connected to a backend. If you have already created some components but have never integrated a REST API in a structured way, this is exactly the right starting point.

Lessons list

I'll show you how to download the Node.js REST API project from GitHub, install dependencies, and run it locally on your machine — this is the backend we'll use to connect the Angular app throughout the course.

Guarda lezione

Let's create the Angular project from scratch with Angular CLI, configure the Router Outlet for multi-page navigation, and add a responsive Bootstrap navbar with the main links.

Guarda lezione

Let's see how to manage navigation in Angular using RouterLink passed as an array to build dynamic URLs, and how to integrate a Bootstrap dropdown menu that works correctly with the Angular router.

Guarda lezione

I'll give you a practical recap of JavaScript Promises: how resolve and reject work, how to chain them with then/catch, and why they're fundamental for understanding asynchronous HTTP calls in Angular.

Guarda lezione

I'll explain how to use the JavaScript Fetch API to send HTTP requests to a REST API, how to handle Promise resolution with callbacks, read the JSON body, and analyze the received response.

Guarda lezione

Let's see how to simplify fetch calls in Angular using the async/await syntax: cleaner code compared to callbacks, error handling with try/catch, and a more natural asynchronous flow to follow.

Guarda lezione

Let's create TypeScript models in Angular to type REST API responses: interfaces that describe the data structure, making the code more robust, type-safe, and easier to maintain.

Guarda lezione

I'll show you how to create an Angular Service with the @Injectable decorator to centralize all HTTP calls to the events REST API, separating data access logic from the components that consume it.

Guarda lezione

Let's build the new event insert form in Angular using FormsModule and the ngModel directive for two-way binding, sending data to the REST API through the service with async/await.

Guarda lezione

Let's refactor the Angular Service by adding structured error handling: I'll introduce guard functions to manage timeouts, network errors, non-ok responses, and unexpected cases in a centralized way.

Guarda lezione

Let's implement element deletion in Angular: I'll call the REST API with HTTP DELETE via fetch and async/await, update the local list, and handle errors inside the service.

Guarda lezione

Let's analyze the event management project requirements using a UML use case diagram: we'll model actors, main actions, and Include relationships before writing any code.

Guarda lezione

I'll show you how to display the detail of a single event in Angular: I'll use ActivatedRoute to read the ID parameter from the route, subscribe to the params Observable, and call the service to fetch the data.

Guarda lezione

In this final lesson we'll implement event editing with HTTP PATCH: I'll use fetch and async/await in the service to send only the modified fields to the REST API, completing the full CRUD of the Angular app.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 14
  • Duration 4h 43m
  • Difficulty intermedio
  • Language it
  • Certificate No

Recently viewed