angular-api

Configure the auto-generated backend.api.ts client in Angular's dependency injection system.

Updated Dec 5, 2025
One-click install
npx skills add https://github.com/transporte-terrestre/front-transporte --skill angular-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-api
Source: https://github.com/transporte-terrestre/front-transporte/tree/main/.agent/skills/angular-api
Command: npx skills add https://github.com/transporte-terrestre/front-transporte --skill angular-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the integration of auto-generated API clients into Angular applications, ensuring type safety and efficient API interaction.

Core Features & Use Cases

  • Provider Configuration: Sets up the Api class with dependency injection for HttpClient, handling authentication tokens and error interception.
  • Strict Typing: Utilizes generated utility types (ApiBody, ApiResponse, ApiQuery) for robust request and response handling.
  • Use Case: When building a new feature that requires fetching user data, use this skill to inject the Api service and make a type-safe call to the user endpoint.

Quick Start

Use the angular-api skill to configure the Api provider in app.config.ts and inject the Api service into your Angular components.

Frequently Asked Questions about angular-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate a Swagger generated API client in Angular using dependency injection?

To integrate an auto-generated API client in Angular, configure the Api class as a provider in app.config.ts, injecting HttpClient alongside security workers for token injection and custom fetch for error handling.

How do I handle 401 errors with an auto-generated Angular API client?

Handle 401 errors in your Angular API client by configuring a custom fetch mechanism within the provider setup in app.config.ts to intercept unauthorized responses and manage authentication token refresh logic.

How do I inject authentication tokens into Angular HttpClient requests for an auto-generated API?

Inject authentication tokens into Angular HttpClient requests by defining a security worker during the Api class provider configuration in app.config.ts, ensuring secure API interaction across components.

What is the best way to type API responses and query parameters in Angular?

The best way to type API responses and query parameters in Angular is by using generated utility types like ApiBody, ApiResponse, and ApiQuery to enforce strict typing for requests and responses.

Does this Angular API integration approach require manual HttpClient setup in components?

No, this Angular API integration approach abstracts manual HttpClient setup by providing the auto-generated Api class via dependency injection, allowing components to directly make type-safe API calls.