Bootstrap

API coercion

auBooleanAttribute

function

auBooleanAttribute(value): boolean | undefined

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

Parameters

value: unknown

Value to be transformed.

Returns

boolean | undefined

the value transformed

Example

@Input({ transform: auBooleanAttribute }) status: boolean | undefined;


auNumberAttribute

function

auNumberAttribute(value): number | undefined

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

Parameters

value: unknown

Value to be transformed.

Returns

number | undefined

the value transformed

Example

@Input({ transform: auNumberAttribute }) id: number | undefined;