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

43 lines
792 B
Markdown

## Examples
{% tabs %}
{% tab label="Simple Component" %}
Create a component named `my-component`:
```bash
nx g @nx/angular:component my-component
```
{% /tab %}
{% tab label="Standalone Component" %}
Create a standalone component named `my-component`:
```bash
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:
```bash
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:
```bash
nx g @nx/angular:component my-component --changeDetection=OnPush
```
{% /tab %}