This is my code:
<h2>HEUTE</h2>
<h2 ng-if="d == 1">Montag: {{cat.montag}}</h2>
<h2 ng-if="d == 2">Dienstag: {{cat.dienstag}}</h2>
<h2 ng-if="d == 3">Mittwoch: {{cat.mittwoch}}</h2>
<h2 ng-if="d == 4">Doerstag: {{cat.doerstag}}</h2>
<h2 ng-if="d == 5">Freitag: {{cat.freitag}}</h2>
<h2 ng-if="d == 6">Samstag: {{cat.samstag}}</h2>
<h2 ng-if="d == 0">Sotag: {{cat.sotag}}</h2>
Controller:
$scope.getDate = function() {
var n = new Date();
$scope.d = n.getDay();
}
The problem is that when I insert the second ng-if (Dienstag) the correct day isn't shown anymore. Do i missed something?
