Assigning Boolean Values to Angular Input Properties | Task

Ole Ersoy
Feb - 04  -  1 min

Scenario

We have a Hola component that should display HOLA! when spanish is true.

Approach

Use brackets:

<halo-comp #h [spanish]="true" [text]="h.spanish ? hola : hello"></halo-comp>

Demo