Declare a required signal input with `input.required<T>()`. Angular will require the parent to bind it, and the component reads the current value by calling the signal, for example `userId()` rather than `userId`. ```ts import { booleanAttribute, ChangeDetectionStrategy, Component, input, } from '@angular/core'; @Component({ selector: 'app-user-badge', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: ` <span [attr.data-user-id]="userId()" [attr.aria-di...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill angular-components --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Angular Components?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-angular-components-6269df51)More formats (shields.io, HTML) on the badges page.
# Using signal inputs with `input.required()`
Declare a required signal input with `input.required<T>()`. Angular will require the parent to bind it, and the component reads the current value by calling the signal, for example `userId()` rather than `userId`.
```ts
import {
booleanAttribute,
ChangeDetectionStrategy,
Component,
input,
} from '@angular/core';
@Component({
selector: 'app-user-badge',
standalone: true,
imports: [],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<span
[attr.data-user-id]="userId()"
[attr.aria-disabled]="disabled()"
>
User {{ userId() }}
</span>
`,
})
export class UserBadgeComponent {
readonly userId = input.required<string>();
readonly disabled = input(false, { transform: booleanAttribute });
}
```
The parent supplies the required value with normal property binding:
```html
<app-user-badge [userId]="selectedUserId" disabled />
```
Use `input<T>(defaultValue)` for optional inputs with a default. Input transforms such as `booleanAttribute` or `numberAttribute` normalize attribute values at the boundary. Signal inputs are read-only from the child; if the child needs to communicate a change, expose an `output()` or `model()` instead of mutating the input.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!