Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

ng config

Retrieves or sets Angular configuration values in the angular.json file for the workspace.

      
      ng config [json-path] [value]
    

Description

A workspace has a single CLI configuration file, angular.json, at the top level. The projects object contains a configuration object for each project in the workspace.

You can edit the configuration directly in a code editor, or indirectly on the command line using this command.

The configurable property names match command option names, except that in the configuration file, all names must use camelCase, while on the command line options can be given dash-case.

For further details, see Workspace Configuration.

For configuration of CLI usage analytics, see ng analytics.

Arguments

Argument Description Value Type
json-path

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.

string
value

If provided, a new value for the given configuration key.

string

Options

Option Description Value Type Default Value
--global

Access the global configuration in the caller's home directory.

Aliases: -g

boolean false
--help

Shows a help message for this command in the console.

boolean