HABPanel - How to use ng-if

Hello,
one short question.

I would like to use the following template to display the trash cans that is loaded today or the next one:

   <div ng-if="(itemValue('Today')| date:'dd/MM/yyyy' == itemValue('gCal_Abfall_Event1_StartTime')| date:'dd/MM/yyyy')">
          <img src="https://xxxxxxxxxxxx/Openhab/{{itemValue('gCal_Abfall_Event1_Summary')}}.png" height="100" width="100"/>
          <h4>Heute wird der {{itemValue('gCal_Abfall_Event1_Summary')}} abgeholt. </h4>
    </div>
    <div ng-if="(itemValue('Today')| date:'dd/MM/yyyy' != itemValue('gCal_Abfall_Event1_StartTime')| date:'dd/MM/yyyy')">
      <h2>Heute keine Müllabfuhr!</h2> 
      <h4>Nächster Mülltermin: {{itemValue('gCal_Abfall_Event1_StartTime') | date:'dd.MMM.yyyy'}}</h4> 
      <h3>Nächste Tonne:  {{itemValue('gCal_Abfall_Event1_Summary')}}
      <img src="https://xxxxxxxxxxxx/Openhab/{{itemValue('gCal_Abfall_Event1_Summary')}}.png" height="80" width="80"/>
       </h3>
    </div>

With my understanding the first part should only be displayed when Today matches the Event start time. This is working well. The second part should be only displayed if today does not match the Event start time.

But actually both parts are shown.

image

Can anyone help me with this.

Thank you!

Jan

1 Like