DWQA QuestionsCategory: ProgramHas anyone seen error:[$ parse:lexerr ]What is the reason for this mistake?
huge_simple asked 2 months ago

clipboard.png
clipboard.png
clipboard.png
Just change the code above to report the error below! The code above is the code when the error is reported, but the page still displays normally…? If you don’t change this part, you will not report an error. If you change it, you will report an error. What does this error mean

2 Answers
wuweisen answered 2 months ago

The writing is wrong

<td class="subject v-middle">
    <span ng-show=" item.sex  =='1' "> male</span>
    <span ng-show=" item.sex  =='0' "> female</span>
</td>

In the ng – * instruction, there is no need to add {}}
To achieve the functions you need, the code can be directly modified as follows:

<td class="subject v-middle">
    <span>{{ item.sex  =='1'?'male ':'female'}</span>
</td>
undefind_5 answered 2 months ago

Seriously, because I have not used the two frameworks mentioned by you, I can’t give any specific suggestions. But I don’t know if you have found that there is a ng show behind your span? Custom or referenced framework? )In any case, the specification of attrname = “value” should be followed. So maybe it’s ng show = “{{ item.sex }}==’1′? Or, it could be ng show = “{{ item.sex }}”= = =’1 ‘(this is more unscientific).