pickstack

Angular + Axios

HTTP client with a preconfigured base URL. This page shows exactly what pickstack adds to a Angular project for Axios: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.

$ npm create pickstack@latest my-app -- --framework angular --modules axios --yes
Customize in the configurator

Packages it adds

PackageVersionType
axios^1.21.1runtime

New files

src/app/api/client.ts
import axios from "axios";
import { environment } from "../../environments/environment";

export const api = axios.create({
  baseURL: environment.apiUrl,
  timeout: 10_000,
});
src/environments/environment.ts
export const environment = {
  apiUrl: "http://localhost:3000",
};

Changes to existing files

src/app/pages/about/about.html (changed)
 <section class="page">   <h1 class="title">About</h1>+  <p class="text">Built with Angular 22, TypeScript, Axios.</p>−  <p class="text">Built with Angular 22, TypeScript.</p> </section>  

Project files

Related templates