Skip to content

Latest commit

 

History

History
102 lines (98 loc) · 1.9 KB

directive.md

File metadata and controls

102 lines (98 loc) · 1.9 KB

Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see here.

ng generate directive

Overview

ng generate directive [name] generates a directive

Alias

d - ng generate d [name]

Options

dry-run

--dry-run (alias: -d)

Run through without making any changes.

force

--force (alias: -f)

Forces overwriting of files.

project

--project

The name of the project.

prefix

--prefix (alias: -p)

The prefix to apply to generated selectors.

spec

--spec

Specifies if a spec file is generated.

skip-import

--skip-import

Flag to skip the module import.

selector

--selector

The selector to use for the directive.

flat

--flat

Flag to indicate if a dir is created.

module

--module (alias: -m)

Allows specification of the declaring module.

export

--export

Specifies if declaring module exports the directive.