0
I have a page html containing the following code:
<button
class="button button-assertive button-full button-outline centro icon ion-plus"
option-getter="getOpt(option, complemento)"
modal-select=""
modal-title="{{complemento.nome}}"
ng-model="produto.adicionais[complemento.nome]"
options="complemento.complementos"
option-property="nome"
multiple="{{ isMultiple(complemento) }}"
has-search="true">
But in this part I call a function that returns true or false:
multiple="{{ isMultiple(complemento) }}"
It is not working, the function is not called, the HTML end gets the same code as a string.
I have tried to use without quotation marks as follows:
multiple={{ isMultiple(complemento) }}
Returning "true" or "false" of function happening the same thing.
Well, that
multiplemust be part of the lib/directive it is using. What is its/its name? Or it was you who created it?– Giovane
It is the Ionic-modal-select. (https://github.com/inmagik/ionic-modal-select)
– Ace
Try not to use the
{{ ... }}. Ex:multiple="isMultiple(complemento)"– Giovane
It doesn’t work, it’s been tested. It recognizes everything as
true– Ace
Yes, if you see in the documentation any past value is accepted as true, then try to return null instead of false.
– Giovane
But the problem is just this. The function is not called, it goes as string pro html. Any value I return will not appear there, and the console.log inside the function also does not appear on the console.
– Ace