The snippet library.
Small, practical examples. Search by task or narrow things down below.
Bind a checkbox with ngModel
Bind a checkbox with ngModel with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bind a numeric style with units
Bind a numeric style with units with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bind a select element
Bind a select element with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bind a text field in both directions
Bind a text field in both directions with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bind an accessibility attribute
Bind an accessibility attribute with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bind an element property
Bind an element property with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Bootstrap your first standalone Angular component
Bootstrap your first standalone Angular component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Calculate a value in a template
Calculate a value in a template with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Call a component method from an event
Call a component method from an event with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Choose template content with @switch
Choose template content with @switch with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Derive a value with computed
Derive a value with computed with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Display a component field with interpolation
Display a component field with interpolation with a standalone Angular component and explicit browser behavior.
Angular✓ Tested