Change image if input is on (ng-if)

Hi, iam new, but try to learn, now i try to show one image if a input is on, and another if the input is off, i have taken some codes form exampels, but, dam missing something, but can’t figure it out…

Detektor 2: {{itemValue('Detektor2')}}

<div ng-if="itemValue('Detektor2')on">
  It's on!
    <img src="/static/test/Xon.jpg"/>
</div>

<div ng-if="itemValue('Detektor2')off">
  It's off!
    <img src="/static/test/Xoff"/>
</div>

Line 1 is working, but no images, what am i doing wong?

(Code is inside a template widget)

Detektor 2: {{itemValue('Detektor2')}}

<div ng-if="itemValue('Detektor2')=='ON'">
  It's on!
    <img src="/static/test/Xon.jpg"/>
</div>

<div ng-if="itemValue('Detektor2')=='OFF'">
  It's off!
    <img src="/static/test/Xoff.jpg"/>
</div>

Thanks now it is working !