generate application
ng generate application
ng generate app
Generates a new basic application definition in the "projects" subfolder of the workspace.
Arguments
name
The name of the new application.
string
Options
inline-style
s
Include styles inline in the root component.ts file. Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root component.ts file.
boolean
inline-template
t
Include template inline in the root component.ts file. Default is false, meaning that an external template file is created and referenced in the root component.ts file.
boolean
minimal
Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)
boolean
Defaultfalse
prefix
p
A prefix to apply to generated selectors.
string
Defaultapp
project-root
The root directory of the new application.
string
routing
Creates an application with routing enabled.
boolean
Defaulttrue
skip-install
Skip installing dependency packages.
boolean
Defaultfalse
skip-package-json
Do not add dependencies to the "package.json" file.
boolean
Defaultfalse
skip-tests
S
Do not create "spec.ts" test files for the application.
boolean
Defaultfalse
ssr
Creates an application with Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) enabled.
boolean
Defaultfalse
standalone
Creates an application based upon the standalone API, without NgModules.
boolean
Defaulttrue
strict
Creates an application with stricter bundle budgets settings.
boolean
Defaulttrue
style
The file extension or preprocessor to use for style files.
string
Defaultcss
view-encapsulation
The view encapsulation strategy to use in the new application.
string