@nrwl/angular:scam
Creates a new, generic component definition in the given or default project.
Usage
nx generate scam ...
By default, Nx will search for scam
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
nx g @nrwl/angular:scam ...
Show what will be generated without writing to disk:
nx g scam ... --dry-run
Options
changeDetection
Default
Default
, OnPush
The change detection strategy to use in the new component.
displayBlock
false
Specifies if the style will contain :host { display: block; }
.
export
true
Specifies if the SCAM should be exported from the project's entry point (normally index.ts
). It only applies to libraries.
flat
false
Create the new files at the top level of the current project.
inlineStyle
false
Include styles inline in the component.ts
file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts
file.
inlineTemplate
false
Include template inline in the component.ts
file. By default, an external template file is created and referenced in the component.ts
file.
inlineScam
true
Create the NgModule
in the same file as the component.
name
The name of the component.
path
path
The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.
project
The name of the project.
prefix
The prefix to apply to the generated component selector.
style
css
css
, scss
, sass
, less
, none
The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.
skipTests
false
Do not create spec.ts
test files for the new component.
selector
html-selector
The HTML
selector to use for this component.
skipSelector
false
Specifies if the component should have a selector or not.
type
component
Adds a developer-defined type to the filename, in the format name.type.ts
.
viewEncapsulation
Emulated
, None
, ShadowDom
The view encapsulation strategy to use in the new component.