@nrwl/angular:directive
Creates a new, generic directive definition in the given project.
Creates a new, generic directive definition in the given project.
nx generate directive ...
nx g d ... #same
By default, Nx will search for directive in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
nx g @nrwl/angular:directive ...
Show what will be generated without writing to disk:
nx g directive ... --dry-run
The name of the new directive.
The name of the project.
falseThe declaring NgModule exports this directive.
trueWhen true (the default), creates the new files at the top level of the current project.
The filename of the declaring NgModule.
pathThe path at which to create the interface that defines the directive, relative to the workspace root.
A prefix to apply to generated selectors.
falseDo not create "spec.ts" test files for the new class.
falseDo not import this directive into the owning NgModule.
html-selectorThe HTML selector to use for this directive.
falseWhether the generated directive is standalone. Note: This is only supported in Angular versions >= 14.1.0.
falseSkip formatting of files.