Widget ng-hide problem

hello together,

working on My habpanel im facing another Problem with A widget. i reused an available calendar widget and wanted to add A Filter if there are not enough Events in the next time. then the widget always showed an ugly “UNDEF”.
So i tried ng-hide at different places but result is always that it works until i refresh the Browser.
any one know why? :face_with_monocle:

<div class="calendar">
  <div class="calendar-header">{{config.CalendarHeader}}</div>
  <div ng-repeat-start="n in [].constructor(5) track by $index">
    <div ng-if="(config.CalendarGlobalNumberOfEvents > $index) && ((config['CalendarEvent'+ ($index+1)+'StartDateTime'])!==UNDEF) && ((config['CalendarEvent'+ ($index+1)+'StartDateTime'])!==NULL)" class="calendar-row" 
         ng-hide="{{itemValue(startTime)}}==UNDEF || {{itemValue(startTime)}}==NULL" class="ng-hide"
         ng-init="endTime =config['CalendarEvent'+ ($index+1)+'EndDateTime']; 
                  startTime=config['CalendarEvent'+ ($index+1)+'StartDateTime']; 
                  summary=config['CalendarEvent'+ ($index+1)+'Summary'];
                  location=config['CalendarEvent'+ ($index+1)+'Location'];">
      <div class="calendar-col-1">
      	<div ng-if="(config.CalendarGlobalShowDate)" class="event-date"> {{itemValue(startTime) | date:'dd. MMM'}}</div>
      	<div ng-if="(config.CalendarGlobalShowDay)" class="event-day"> {{itemValue(startTime) | date:'EEE'}}</div>
      </div>
     	<div class="calendar-col-2">
        <div class="event-summary">
      		<span ng-if="(config.CalendarGlobalShowSummary)"> {{itemValue(summary)}}</span>
        </div>
        <div class="event-time">
          <span ng-if="(config.CalendarGlobalShowTime) && ((itemValue(startTime) | date:'dd.MM.yyyy') == (itemValue(endTime) | date:'dd.MM.yyyy'))"> {{itemValue(startTime) | date:'HH:mm'}}</span>
          <span ng-if="(config.CalendarGlobalShowTime) && ((itemValue(startTime) | date:'dd.MM.yyyy') == (itemValue(endTime) | date:'dd.MM.yyyy'))"> - </span>
          <span ng-if="(config.CalendarGlobalShowTime) && ((itemValue(startTime) | date:'dd.MM.yyyy') == (itemValue(endTime) | date:'dd.MM.yyyy'))"> {{itemValue(endTime) | date:'HH:mm'}}</span>     
        </div>
        <div class="event-location">
        	<span ng-if="(config.CalendarGlobalShowLocation)"> {{itemValue(location)}}</span>
        </div>
      </div>
    </div>
	</div>
  <div ng-repeat-end ng-if="(config.CalendarGlobalNumberOfEvents > $index +1)">
      <hr class="event-divider"/>
  </div>
</div>

Screenshot_20200510-202702_Chrome Screenshot_20200510-201103_Chrome