@nx/angular:scam-to-standalone

Convert an Inline SCAM to a Standalone Component.

Examples

This generator allows you to convert an Inline SCAM to a Standalone Component. It's important that the SCAM you wish to convert has it's NgModule within the same file for the generator to be able to correctly convert the component to Standalone.

1 2nx g @nx/angular:scam-to-standalone --component=libs/mylib/src/lib/myscam/myscam.component.ts --project=mylib 3 4

Usage

1nx generate scam-to-standalone ... 2

By default, Nx will search for scam-to-standalone in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/angular:scam-to-standalone ... 2

Show what will be generated without writing to disk:

1nx g scam-to-standalone ... --dry-run 2

Options

component

string

The path to the SCAM component file, relative to the root of the project containing the SCAM.

project

string

The project containing the SCAM.

skipFormat

Internal
boolean

Skip formatting the workspace after the generator completes.