Component workflow

Components are fundamental building blocks of the application's user interface responsible for displaying and controlling a parts of the view

Component library location: /libs/components/{{component-name}}

Do generate a component library for isolated components

Do keep components dumb or presentational

Do communicate through @Input and @Output

Do use OnPush change detection

Do use standalone component architecture

Do use the --flat architecture

Avoid --inlineStyle option

Avoid --inlineTemplate option

Component library generator options

Run the below command to view all library options.

nx g component --help

Components options reference: https://nx.dev/packages/angular/generators/componentarrow-up-right

Generate a component library

Run the below command to generate a component library

Last updated