search

Home  >  Q&A  >  body text

angular.js - How to deal with operation symbols in angular's ng-if expression? ?

ng-if="curindex==(node.nodeIndex+1)"

What I write this way is invalid,

curindex==node.nodeIndex+1

Written like this, the calculation is wrong.

How to deal with it? ? ? ? What I mean is the comparison between node.nodeIndex 1 and curindex

仅有的幸福仅有的幸福2754 days ago747

reply all(4)I'll reply

  • PHPz

    PHPz2017-05-15 17:06:21

    The first way of writing is correct. Angular conflicts with some libraries and ng-if will fail. Also, other parts of what you wrote are wrong.

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-15 17:06:21

    It seems to me that there is no problem. The problem lies elsewhere. Please post an error report

    reply
    0
  • PHP中文网

    PHP中文网2017-05-15 17:06:21

    (curindex==node.nodeIndex+1) Try it

    reply
    0
  • 習慣沉默

    習慣沉默2017-05-15 17:06:21

    ng-if="curindex=='node.nodeIndex+1'"

    There should be no problem if you write like this

    reply
    0
  • Cancelreply