nx/packages/angular/docs/component-examples.md
Isaac Mann afa5eb59fa
docs(core): document the @nrwl => @nx rescope (#16403)
Co-authored-by: FrozenPandaz <jasonjean1993@gmail.com>
2023-04-27 18:14:59 -04:00

792 B

Examples

{% tabs %} {% tab label="Simple Component" %}

Create a component named my-component:

nx g @nx/angular:component my-component

{% /tab %}

{% tab label="Standalone Component" %}

Create a standalone component named my-component:

nx g @nx/angular:component my-component --standalone

{% /tab %}

{% tab label="Single File Component" %}

Create a component named my-component with inline styles and inline template:

nx g @nx/angular:component my-component --inlineStyle --inlineTemplate

{% /tab %}

{% tab label="Component with OnPush Change Detection Strategy" %}

Create a component named my-component with OnPush Change Detection Strategy:

nx g @nx/angular:component my-component --changeDetection=OnPush

{% /tab %}