numberAttribute
function
Transforms a value (typically a string) to a number. Intended to be used as a transform function of an input.
numberAttribute
numberTransforms a value (typically a string) to a number. Intended to be used as a transform function of an input.
@paramvalue
unknownValue to be transformed.
@paramfallbackValue
numberValue to use if the provided value can't be parsed as a number.
@returns
numberUsage Notes
@Input({ transform: numberAttribute }) id!: number;
Jump to details