* ngIf with boolean

1

I have a Boolean argument in an * ngIf, but it does not seem to work. If the argument is true:

<ion-input type="text" *ngIf="produto.fracionado"  value="Sim" readonly></ion-input>

If the argument is false:

<ion-input type="text" *ngIf="!produto.fracionado" value="Não" readonly></ion-input>

However, it is always returned "Yes", even for cases of the false argument.

    
asked by anonymous 15.08.2017 / 13:43

1 answer

0

Your html is correct. You can show me the result of your object. I did a simulation on my project with Ionic 3 this way:

public product: object = {     fractionated: false }

    
19.08.2017 / 03:26