ng new
This is the documentation for Angular 7.
You can switch to the
latest version Angular 10.
ng new [name] [--[argument]=[value]]
ng n
Creates a new angular application.
Default applications are created in a directory of the same name, with an initialized Angular application.
Options
--collection
#
Schematics collection to use. Type | string |
Default | @schematics/angular |
Aliases | c |
--commit
#
Initial repository commit information. Type | boolean |
Default | true |
--createApplication
#
Flag to toggle creation of an application in the new workspace. Type | boolean |
Default | true |
--defaults
#
When true, disables interactive input prompts for options with a default. Type | boolean |
Default | false |
--directory
#
The directory name to create the workspace in. --dryRun
#
Run through without making any changes. Type | boolean |
Default | false |
Aliases | d |
--experimentalIvy
#
EXPERIMENTAL: Specifies whether to create a new application which uses the Ivy rendering engine. Type | boolean |
Default | false |
--force
#
Forces overwriting of files. Type | boolean |
Default | false |
Aliases | f |
--help
#
Shows a help message for this command in the console. Values | true|false|json|JSON |
Default | false |
--inlineStyle
#
Specifies if the style will be in the ts file. Type | boolean |
Default | false |
Aliases | s |
--inlineTemplate
#
Specifies if the template will be in the ts file. Type | boolean |
Default | false |
Aliases | t |
--interactive
#
When false, disables interactive input prompts. Type | boolean |
Default | false |
--minimal
#
Create a barebones project without any testing frameworks. Type | boolean |
Default | false |
--newProjectRoot
#
The path where new projects will be created. Type | string |
Default | projects |
--prefix
#
The prefix to apply to generated selectors. Type | string |
Default | app |
Aliases | p |
--routing
#
Generates a routing module. Type | boolean |
Default | false |
--skipGit
#
Skip initializing a git repository. Type | boolean |
Default | false |
Aliases | g |
--skipPackageJson
#
Do not add dependencies to `package.json`. Aliases | skip-package-json |
--skipInstall
#
Skip installing dependency packages. Type | boolean |
Default | false |
--skipTests
#
Skip creating spec files. Type | boolean |
Default | false |
Aliases | S |
--style
#
The file extension to be used for style files. Type | string |
Values | css, scss, less, sass, styl |
Default | css |
--verbose
#
Adds more details to output logging. Type | boolean |
Default | false |
Aliases | v |
--viewEncapsulation
#
Specifies the view encapsulation strategy. Values | Emulated|Native|None|ShadowDom |
Aliases | view-encapsulation |