콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
15401 화면

 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'. 

아바타
취소
베스트 답변

Hi,

Try it like this, it normally works

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

아바타
취소
작성자

It works, thanks :)

베스트 답변

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

Correct me,If I am wrong
 Thank you


아바타
취소
베스트 답변

My guess is that it should probably be unicode:

<t t-if="u'Total' in a.name">
아바타
취소
관련 게시물 답글 화면 활동
1
2월 18
3454
0
2월 18
3350
1
7월 25
1760
1
5월 25
1787
1
4월 25
2314