Back to results for “JSON”
Angular › Angular CLI & Project Structure

What is the purpose of the angular.json file in an Angular project?

Beginner

Answer

The angular.json file holds the configuration for how your project is built, tested, and served, including things like which files to include in the build, environment specific settings, and build output locations. The CLI reads this file whenever you run commands like ng build or ng serve.
{
  "projects": {
    "my-app": {
      "architect": {
        "build": { "options": { "outputPath": "dist/my-app" } }
      }
    }
  }
}
Real-world example A team changes their build output folder by editing a single value inside angular.json, without needing to touch any actual build tool configuration files directly.

Common follow-ups: What happens if you manually edit angular.json incorrectly?;How does angular.json differ from package.json?