鉴于代码:
<section class="calendar__day--view" ng-init="weekday = date.firstWeekdayOfMonth" ng-model="weekday">
<div ng-repeat="bill in data.budget.bills">
<div ng-if="bill.weekday === weekday || bill.date === $parent.$index">
<strong>{{bill.name}}: {{bill.amount}}</strong>
</div>
</div>
</section>
其中date.firstWeekdayOfMonth
是星期几(0-6 [sun-sat]),第一天开启,我怎么能增加weekday
?
例如,如果该月的第一天是星期五(5),我将如何增加?
编辑:这是父级重复:
<div class="calendar__day col-xs-12 col-md-1" ng-repeat="day in calendar.daysInMonthArray" tabindex="0">
<span class="calendar__day--number">{{day + 1}}</span>
<app-calendar-day-view></app-calendar-day-view>
</div>