# Deploy Angular

Angular is detected from `angular.json`, and deploys as a static site: `npm run build` fills `dist/browser`, and the CDN serves it with [free bandwidth](/billing/pricing#static-sites). No server, no region, no cold starts.

## Build

- **Output directory:** `dist/browser` - the modern application builder's default. Detection parses `angular.json` to find where your configuration actually writes; override in [Build settings](/create/build-settings#output-directory) if needed.
- **Install:** follows your lockfile - see [How detection works](/platform/frameworks#how-detection-works).

## Per-environment configuration

Angular bakes configuration at build time through its `environment.ts` file replacements rather than environment variables - `production` builds get `environment.prod.ts`. Values that differ per deployed [environment](/platform/preview-environments) (API base URLs, keys) can also be read from variables inside `angular.json`-driven builds only via custom tooling; the simplest platform-native pattern is one build configuration per case, selected in the [build command](/create/build-settings#build-command):

```bash
npm run build -- --configuration=staging
```

Set a different build command on the preview environment than on production.

## Need a server?

Deploy the API as its own [backend app](/platform/frameworks#backend) - keep both in one repository with two [root directories](/create/application-settings#root-directory).

## Related

- [Build settings](/create/build-settings): Per-environment build command overrides.
- [Preview environments](/platform/preview-environments): Different settings per branch.
- [Custom domains](/platform/custom-domains): Your own hostname on the CDN.
