Angular CDK Coercion
Angular CDK provides the below coercion functions to convert data to a required format implicitly.
coerceBooleanProperty
— Coerces a data-bound value (typically a string) to a boolean.coerceNumberProperty
— Coerces a data-bound value (typically a string) to a number.coerceArray
— Wraps the provided value in an array, unless the provided value is an array.coerceCssPixelValue
— Coerces a value to a CSS pixel value.