W3cubDocs

/Angular

numberAttribute

Transforms a value (typically a string) to a number. Intended to be used as a transform function of an input.

API

function numberAttribute(value: unknown, fallbackValue?: number): number;

Usage Notes

 status = input({ transform: numberAttribute });

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/core/numberAttribute