Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
15419 Vizualizări

 I would like to use t-if condition to check whether a field name (Ex.: 'Total Value') contains a string '**Total**'. I tried using:

t-if = 'Total' in a.name but it seems to check whether a.name is equal to 'Total'. 

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Try it like this, it normally works

<t t-if="'Total' in a.name">

Imagine profil
Abandonează
Autor

It works, thanks :)

Cel mai bun răspuns

<t t-if="'Total' in a.name">

Correct me,If I am wrong
 Thank you


Imagine profil
Abandonează
Cel mai bun răspuns

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
feb. 18
3466
0
feb. 18
3362
1
iul. 25
1776
1
mai 25
1858
1
apr. 25
2332