October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Angular Signal Inputs: How to Declare, Require, and Migrate Them

Angular signal inputs expose parent-provided values as readable signals. Learn optional and required declarations, transforms, model() trade-offs, and the migration schematic.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Angular signal inputs let a component or directive read parent-provided values as signals. Declare them with input() or input.required() from @angular/core, then call the member to read its current value. Use model() instead when the child must update a value and propagate that change back to its parent.

How signal inputs work

An input signal is a class member whose value Angular updates when the parent binding changes. The receiving component reads it by calling it, rather than treating it like a plain property.

import { Component, input } from '@angular/core';

@Component({
  selector: 'user-profile',
  template: `{{ firstName() }} {{ lastName() }}`,
})
export class UserProfile {
  firstName = input<string>();
  lastName = input.required<string>();
}

In TypeScript, read the value with this.firstName(); in a template, use firstName(). Angular owns updates to the input signal, so the receiving component reads but does not directly write it. See Angular’s input guide and input API reference.

Optional and required inputs

Optional inputs

input<T>() without an initial value is optional. Its signal type includes undefined, so code that reads it should account for the value not having been supplied. An initial value instead gives the signal that value until Angular supplies a parent binding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Required inputs

Use input.required<T>() when the parent must provide a value. The signal type does not add undefined, and Angular reports missing required inputs in template use during build-time checking. This makes requiredness explicit rather than relying on a runtime default.

Aliases and input transforms

Aliases

An alias changes the name a parent uses in a template binding without changing the member name used inside the component’s TypeScript. Use aliases only when they solve a real naming need; Angular advises against unnecessary aliases and names that conflict with native DOM properties. The options are documented in Angular’s InputOptions API.

Transforms

A transform normalizes a bound value before it becomes the input signal’s value. Its parameter type describes values accepted from the template, while the signal exposes the transformed type. Angular requires transforms to be statically analyzable and recommends keeping them pure.

The built-in booleanAttribute handles HTML-style presence and treats the literal string "false" as false. numberAttribute parses a number and returns NaN when parsing fails. A transform is for input normalization; if you need to derive a value with a different meaning, use computed rather than disguising that derivation as a transform.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose between input() and model()

API Use it when Writeability and propagation Transforms
input() The parent supplies a value and the child reads it. Read-only from the child’s perspective; Angular updates it when the parent binding changes. Supported for normalizing incoming values.
model() The child needs to change a parent-provided value, such as a slider value or custom form-control value. Writable with set and update; it creates a corresponding output with the Change suffix for two-way binding. Input transforms are not supported.

Choose based on who owns changes: if the child only consumes the value, use input(); if it must update the value and communicate that update to the parent, use model(). Both APIs are described in Angular’s signal input guide.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Migrate @Input to signal inputs

Angular’s migration reference describes signal inputs as production ready as of Angular v19. The decorator-based @Input API remains supported, so migration is an available path rather than a requirement to update every project.

  1. From the project workspace, run ng generate @angular/core:signal-input-migration.

  2. Review the migrated declarations and references. The schematic updates eligible @Input() members and adjusts references in templates, host bindings, and TypeScript to call the signal.

    Free tools Windows power users keep installed

    One-click scans. No signup required.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Check skipped members and the scope of analysis. By default, the schematic skips inputs it cannot safely migrate and analyzes the workspace for references even if --path limits where changes are made.

  4. Use --insert-todos if you want comments identifying skipped inputs. Use --best-effort-mode only if you are prepared to inspect and repair changes that may break the build.

  5. Validate references throughout the project before narrowing analysis with --analysis-dir. Limiting analysis to a directory can leave references outside it unchanged. The migration is also available as a VS Code refactor.

Consult the signal inputs migration reference for the schematic’s current behavior and options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which signal input pattern fits?

  • Parent provides a value; child reads it: use input().
  • The parent must provide a value: use input.required().
  • The child must update the value and notify the parent: use model().
  • The incoming value needs normalization: use a pure, statically analyzable transform, such as booleanAttribute or numberAttribute.
  • The component needs a derived value: derive it with computed, not an input transform.
  • The codebase still uses decorators: keep using supported @Input declarations or run the migration and review its changes.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.