angular.json | what is angular.json file ? | configuration file | Angular Tutorial in Telugu Part 10

Опубликовано: 28 Май 2026
на канале: ottit
1,554
35

What is angular.json?
Angular workspace configuration
A file named angular.json at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults for build and development tools provided by the Angular CLI. Path values given in the configuration are relative to the root workspace folder.
At the top level of angular.json, a few properties configure the workspace, and a projects section contains the remaining per-project configuration options.
The following properties, at the top level of the file, configure the workspace:
version: The configuration-file version.
newProjectRoot: Path where new projects are created. Absolute or relative to the workspace folder.
defaultProject: Default project name to use in commands, where not provided as an argument. When you use ng new to create a new app in a new workspace, that app is the default project for the workspace until you change it here.
schematics : A set of schematics that customize the ng generate sub-command option defaults for this workspace.
projects : Contains a subsection for each project (library or application) in the workspace, with the per-project configuration options.
Project configuration options
The following top-level configuration properties are available for each project, under projects: project_name.
"my-app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {}
}
root: The root folder for this project's files, relative to the workspace folder. Empty for the initial app, which resides at the top level of the workspace.
sourceRoot: The root folder for this project's source files.
projectType: One of "application" or "library". An application can run independently in a browser, while a library cannot.
prefix: A string that Angular prepends to generated selectors. Can be customized to identify an app or feature area.
schematics: A set of schematics that customize the ng generate sub-command option defaults for this project.
architect: Configuration defaults for Architect builder targets for this project. #ottit #technologytutorials