我有以下代码。
$scope.Teeslots = function () {
debugger;
$scope.TimeValues = [];
$scope.StartTime = $scope.TeeSheetModel.StartTime;//1
$scope.EndTime = $scope.TeeSheetModel.EndTime; //5
$scope.Interval = $scope.TeeSheetModel.Interval;//15
var count = 0;
for (var i = $scope.StartTime; i < $scope.EndTime; i++) {
var OFFSlotStartTime = i;
var OFFSlotEndTime = i + ':' + $scope.Interval
var OFFSlotTime = OFFSlotStartTime + '-' + OFFSlotEndTime;
var j = OFFSlotTime.substring(2, OFFSlotTime.length);
$scope.TimeValues.push(OFFSlotTime);
}
}
预期产出: -
0-0:15
0:15-0:30
0:30-0:45
0:45:1
1:15-1:30
---
4:45-5
请帮我怎么做?