Template widget - ng-switch syntax with expressions?

Dear all,

I am struggling with the ng-switch syntax using a formatted date expression. The following code always ends up in the ng-switch-default section. … :frowning:

CaldavDate - contains the date of the next time the waste will be picked up
dateToday and dateTomorrow - as the name says
CalDavMuellTonne - contains the subject line of the type of the Muell (e.g. Bio,Papier,GelberSack,Restmuell")

The Idea is to display the corresponding waste picture one day before plus during the day itself…
I guess it has to do with the date-formatting. Perhaps we need to put this date into a variable before?

Any suggestions on the code improvement is welcome…

<div ng-switch="{{itemValue('CalDavDate')| date:'dd/MM/yyyy'}}">
  <div ng-switch-when="{{itemValue('dateToday')| date:'dd/MM/yyyy'}}">
    <img src="/static/muell/{{itemValue('CalDavMuelltonne')}}.gif" height="158" width="158"/>
		<h4>Heute ist {{itemValue('CalDavMuelltonne')}} Müll</h4>
  </div>
  <div ng-switch-when="{{itemValue('dateTomorrow')| date:'dd/MM/yyyy'}}">
    <img src="/static/muell/{{itemValue('CalDavMuelltonne')}}.gif" height="158" width="158"/>
		<h4>Morgen ist {{itemValue('CalDavMuelltonne')}} Müll</h4>
  </div>
  <div ng-switch-default>
    <h3>
      <p>{{itemValue('CalDavDate')| date:'EEEE dd/MM'}}</p>
      <p>{{itemValue('CalDavMuelltonne')}}</p>
    </h3>
    <h5>
      <p>heute: {{itemValue('dateToday')| date:'dd/MM/yyyy'}}</p>
    </h5>
  </div>
</div>