Angular CLI – ng config Command

Angular CLI - ng config Command

In this Angular CLI ng config Command chapter explains the syntax, arguments and options of ng config command along with an example. So all the details Of Angular CLI ng config Command listed below-

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 & SyntaxDescription
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, return 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 & SyntaxDescription
1–global=true|falseWhen true, accesses the global configuration in the caller’s home directory.Default: falseAliases: -g
2–help=true|false|json|JSONShows 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://adglob.in/blog/angular-cli-ng-build-command/.

Now run the config command.

Example

An example for the ng config command is given below −

\>Node\>Adglob> ng config projects.Adglob.projectType
application

Leave a Reply