1
I am wanting to create a condition in JS that I get an object in a file .html
as follows:
<a each="gabarito in $this.gabaritosCopy">
<script> if (gabarito.valor == 'N') { </script>
<div class="col-xs-3">
<span class="col-md-4">Copiar</span>
</div>
<script> } </script>
...
</a>
Only it doesn’t work, someone could help me ?
Could you put a condition example that is plausible with your problem? What are the variables and under what conditions you need to display HTML?
– Woss
@Andersoncarloswoss improved the example in the question !
– Ikaro Sales
Are you using some framework that allows you to do
gabarito in $this.gabaritosCopy
?– Woss
@Andersoncarloswoss Angular !
– Ikaro Sales
So just use the directive
NgIf
– Woss
Ngif from angular 2 is not implemented @Andersoncarloswoss
– Ikaro Sales
It appears that this is the documentation for version 7.2.15
– Woss