The snippet library.
Small, practical examples. Search by task or narrow things down below.
Provide alternative text for an informative image
Provide alternative text for an informative image 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
Publish updated state through a BehaviorSubject
Publish updated state through a BehaviorSubject with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Read a DOM element through a viewChild signal
Read a DOM element through a viewChild signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Read a typed input event
Read a typed input event 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
Read an optional nested value
Read an optional nested value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Register cleanup through DestroyRef
Register cleanup through DestroyRef with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Remove a list item by identifier
Remove a list item by identifier 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