Deployment
Build the library with ng-packagr, build your app with the Angular CLI, and deploy the static output anywhere that serves a single-page app — Cloudflare Pages, Netlify, S3, or any static host.
Building the library
If you are working in the monorepo (the library plus the demo app), the library is built with ng-packagr and a CSS copy step:
npm run build # ng build adminlte-angular + copy AdminLTE CSS
npm run watch # rebuild on change (development config)
The build script runs ng build adminlte-angular then copies AdminLTE's compiled CSS into dist/adminlte-angular/css/adminlte.css — the file exposed through the package's ./css export. Most consumers don't need this step: just npm install @adminlte/angular and the prebuilt package is ready.
Building the demo / your app
npm start # serve the demo at http://localhost:4200
npm run build:demo # production build of the demo app
For your own application, the standard CLI commands apply:
ng serve # dev server
ng build # production build -> dist/<app>/browser
The modern esbuild application builder emits a browser/ folder of static assets ready to upload.
SPA fallback
The app uses the Angular Router with client-side routing, so every unknown path must fall back to index.html (otherwise a deep link like /calendar 404s on refresh). On Cloudflare Pages / Netlify, add a _redirects file to your static output (e.g. public/_redirects, which the build copies to the output root):
/* /index.html 200
This rewrites all paths to index.html with a 200, letting the Angular Router resolve the route on the client.
On other hosts the equivalent is: nginx try_files $uri /index.html;, Apache a RewriteRule to index.html, or an S3/CloudFront error-document rule pointing 404s at index.html.
Cloudflare Pages
The live demo is hosted on Cloudflare Pages at adminlte-angular.pages.dev. To deploy a static SPA there:
- Build command:
npm run build:demo(orng buildfor your own app). - Output directory: the
browser/folder of the build (e.g.dist/demo/browser). - SPA fallback: include the
_redirectsfile shown above in the output.
You can also deploy from the CLI with Wrangler:
npx wrangler pages deploy dist/demo/browser
Production checklist
- Keep the no-flash theme script in
index.htmlso dark mode applies before paint. - Confirm the SPA fallback is in place so deep links and refresh work.
- Install only the optional plugin peers you actually use — they are lazy-loaded, so unused ones add nothing to the bundle.
- Verify the AdminLTE CSS and Bootstrap Icons are listed in
angular.jsonstylesfor production builds.