The snippet library.
Small, practical examples. Search by task or narrow things down below.
Format text through a built-in pipe
Format text through a built-in pipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Handle a button click
Handle a button click with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Handle an event emitted by a child
Handle an event emitted by a child with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Inject a service into a component
Inject a service into a component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Pass a value to a signal input
Pass a value to a signal input with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Project content into a reusable component
Project content into a reusable component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Provide an @empty list state
Provide an @empty list state with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Read an input through a template reference
Read an input through a template reference with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Render a child standalone component
Render a child standalone component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Render a conditional branch with @if
Render a conditional branch with @if with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Render a list with @for and stable tracking
Render a list with @for and stable tracking with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Store reactive state in a signal
Store reactive state in a signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested