MCPcopy Create free account
hub / github.com/angular/angular / withComponentInputBinding

Function withComponentInputBinding

packages/router/src/provide_router.ts:839–851  ·  view source on GitHub ↗
(
  options: ComponentInputBindingOptions = {},
)

Source from the content-addressed store, hash-verified

837 * @returns A set of providers for use with `provideRouter`.
838 */
839export function withComponentInputBinding(
840 options: ComponentInputBindingOptions = {},
841): ComponentInputBindingFeature {
842 const providers = [
843 {
844 provide: INPUT_BINDER,
845 useFactory: () =>
846 new RoutedComponentInputBinder(options, inject(ROUTER_RESOURCES_FEATURE, {optional: true})),
847 },
848 ];
849
850 return routerFeature(RouterFeatureKind.ComponentInputBindingFeature, providers);
851}
852
853/**
854 * Enables view transitions in the Router by running the route activation and deactivation inside of

Calls 2

injectFunction · 0.90
routerFeatureFunction · 0.85

Tested by

no test coverage detected