Results for “control”
Small, practical examples. Search by task or narrow things down below.
Bind a narrowed value using an @if alias
Bind a narrowed value using an @if alias with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Create a modified copy of an immutable record
C#: A with expression creates a shallow copy with selected changed properties.
C#✓ Tested
Define an immutable data record
Java: A local record gives a small Java data carrier named accessors and value semantics.
Java✓ Tested
Expose the current index in @for
Expose the current index in @for with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Filter a signal-backed list
Filter a signal-backed list with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Narrow an object using a type pattern
C#: A successful is pattern introduces a strongly typed local variable.
C#✓ Tested
Narrow an object with a pattern variable
Java: Pattern matching avoids a separate cast after a successful instanceof check.
Java✓ Tested
Page through a collection
Page through a collection with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Parse an enum name without throwing
C#: Combine TryParse and IsDefined when only named declared values should be accepted.
C#✓ Tested
Pass behavior as a function delegate
C#: Func describes a callable with typed parameters and a return value.
C#✓ Tested
Pass values through a custom event
jQuery: trigger passes its extra argument array after the event object.
jQuery✓ Tested
Perform cleanup even after an exception
C#: A finally block runs after a handled failure as well as after success.
C#✓ Tested