Component Input Binding

noun

say it: “kum-POH-nent IN-put BYND-ing” /kəmˈpoʊnənt ˈɪnpʊt ˈbaɪndɪŋ/

A router feature that passes route and query parameters into a component as inputs of the same name.

What is Component Input Binding in Angular?

Component Input Binding — A router feature, switched on with withComponentInputBinding(), that passes a route's parameters and query parameters into the component as inputs with matching names, so the component reads them like any other input.

provideRouter(routes, withComponentInputBinding());

// in the routed component, for the route 'products/:id'
readonly id = input<string>();

In a sentence

  • “With component input binding, the :id in the route arrives in the component's id input.”

Level: Journeyman · More Angular terms at this level

Updated