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 run

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

      
      ng run <target>
    

Description

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

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

You can define new targets and their configuration options in the architect section of the angular.json file which you can run them from the command line using the ng run command.

Arguments

Argument Description Value Type
target

The Architect target to run provided in the following format project:target[:configuration].

string

Options

Option Description Value Type Default Value
--help

Shows a help message for this command in the console.

boolean