{ "id": "cli/run", "title": "ng run", "contents": "\n
\n
\n mode_edit\n code\n
\n \n\n\n
\n \n CLI\n
\n\n \n
\n

ng runlink

\n
\n\n\n \n\n
\n \n

Runs an Architect target with an optional custom builder configuration defined in your project.

\n\n \nng run <target> [options]\n\n\n\n \n

\n \n Description\n

\n

Architect is the tool that the CLI uses to perform complex tasks such as compilation, according to provided configurations.\nThe CLI commands run Architect targets such as build, serve, test, and lint.\nEach named target has a default configuration, specified by an \"options\" object,\nand an optional set of named alternate configurations in the \"configurations\" object.

\n

For example, the \"serve\" target for a newly generated app has a predefined\nalternate configuration named \"production\".

\n

You can define new targets and their configuration options in the \"architect\" section\nof the angular.json file.\nIf you do so, you can run them from the command line using the ng run command.\nExecute the command using the following format.

\n\nng run project:target[:configuration]\n\n\n \n\n \n\n

Arguments

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ArgumentDescriptionValue Type
<target>\n

The Architect target to run.

\n\n \n
string
\n\n\n \n\n

Options

\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OptionDescriptionValue TypeDefault Value
\n --configuration\n \n \n

One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section of angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations.

\n\n

Aliases: -c

\n
string
\n --help\n \n \n

Shows a help message for this command in the console.

\n\n \n
true|false|json|JSONfalse
\n\n\n \n
\n
\n\n\n" }