Angular Boolean Coercion with the new Input Transform Feature
Scenario Our Angular hello component has a responsive boolean @Input property . When responsive is added to a component declaration, we want the responsive property to be true . Thus if we declare hello like this. <hello></hello> Then responsive will be false. But if we declare it like this it will be true . <hello responsive></hello> Approach We will use Angular CDK coerceBooleanProperty function to perform the coercion.