CLI

generate application

Command
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.

Value Typestring

Options

inline-style
Aliass

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.

Value Typeboolean
inline-template
Aliast

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.

Value Typeboolean
minimal

Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)

Value TypebooleanDefaultfalse
prefix
Aliasp

A prefix to apply to generated selectors.

Value TypestringDefaultapp
project-root

The root directory of the new application.

Value Typestring
routing

Creates an application with routing enabled.

Value TypebooleanDefaulttrue
skip-install

Skip installing dependency packages.

Value TypebooleanDefaultfalse
skip-package-json

Do not add dependencies to the "package.json" file.

Value TypebooleanDefaultfalse
skip-tests
AliasS

Do not create "spec.ts" test files for the application.

Value TypebooleanDefaultfalse
ssr

Creates an application with Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) enabled.

Value TypebooleanDefaultfalse
standalone

Creates an application based upon the standalone API, without NgModules.

Value TypebooleanDefaulttrue
strict

Creates an application with stricter bundle budgets settings.

Value TypebooleanDefaulttrue
style

The file extension or preprocessor to use for style files.

Value TypestringDefaultcss
view-encapsulation

The view encapsulation strategy to use in the new application.

Value Typestring
Jump to details