
- Angular CLI Tutorial
- Angular CLI - Home
- Angular CLI - Overview
- Angular CLI - Environment Setup
- Angular CLI Commands
- Angular CLI - ng version
- Angular CLI - ng new
- Angular CLI - ng help
- Angular CLI - ng generate
- Angular CLI - ng build
- Angular CLI - ng run
- Angular CLI - ng serve
- Angular CLI - ng lint
- Angular CLI - ng test
- Angular CLI - ng e2e
- Angular CLI - ng add
- Angular CLI - ng analytics
- Angular CLI - ng config
- Angular CLI - ng doc
- Angular CLI - ng update
- Angular CLI - ng xi18n
- Angular CLI - Code Coverage
- Angular CLI Useful Resources
- Angular CLI - Quick Guide
- Angular CLI - Useful Resources
- Angular CLI - Discussion
Angular CLI - ng config Command
This chapter explains the syntax, arguments and options of ng config command along with an example.
Syntax
The syntax for ng config command is as follows −
ng config <jsonPath> <value> [options]
ng config command retrieves or sets angular configuration values in angular.json.
Arguments
The arguments for ng config command is as follows −
Sr.No. | Argument & Syntax | Description |
---|---|---|
1 | <jsonPath> | The configuration key to set or query, in JSON path format. For example: "a[3].foo.bar[2]". If no new value is provided, returns the current value of this key. |
2 | <value> | If provided, a new value for the given configuration key. |
Options
Options are optional parameters.
Sr.No. | Option & Syntax | Description | 1 | --global=true|false |
When true, accesses the global configuration in the caller's home directory. Default: false Aliases: -g |
2 | --help=true|false|json|JSON |
Shows a help message for this command in the console. Default: false |
---|
First move to an angular project updated using ng build command.This chapter is available at https://www.tutorialspoint.com/angular_cli/angular_cli_ng_build.htm.
Now run the config command.
Example
An example for ng config command is given below −
\>Node\>TutorialsPoint> ng config projects.TutorialsPoint.projectType application
Advertisements