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 --yesCustomize in the configurator
Packages it adds
| Package | Version | Type |
|---|---|---|
axios | ^1.21.1 | runtime |
New files
import axios from "axios";
import { environment } from "../../environments/environment";
export const api = axios.create({
baseURL: environment.apiUrl,
timeout: 10_000,
});
export const environment = {
apiUrl: "http://localhost:3000",
};
Changes to existing files
<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
.gitignoreREADME.mdangular.jsonpackage.jsonpublic/robots.txtsrc/app/api/client.tssrc/app/app.config.tssrc/app/app.htmlsrc/app/app.routes.tssrc/app/app.tssrc/app/components/counter/counter.htmlsrc/app/components/counter/counter.tssrc/app/pages/about/about.htmlsrc/app/pages/about/about.tssrc/app/pages/home/home.htmlsrc/app/pages/home/home.tssrc/environments/environment.tssrc/index.htmlsrc/main.tssrc/styles.csstsconfig.app.jsontsconfig.json