I am interested in creating a form with a specific function. The form will have multiple criterias. When a criterion is met an associated price will display. In this case, the user has an option of selecting sets of days and then times. I have hit a stumbling block in that I can filter times by a date range, but this only returns an array ("['4:55pm-5:25',..]). I need this array to be split and used for a new set of option values. See below for an image example of the problem. Also, I am trying to avoid using one ng-repeat inside of another ng-repeat as this is non-applicable with the select form type. I've tried using another function and using ng-repeat="time in times.times" without any luck.
JS:
$scope.times = [
{'day': 'Monday & Wednesday', 'dates': ['8/10-8/31', '9/2 - 9/30', '10/5- 10-28'], 'times': ['4:55pm - 5:25pm', '5:40pm - 6:10pm', '6:20pm - 6:50pm'], 'price': '46'},
{'day': 'Tuesday & Thursday', 'dates': ['8/11-8/27'], 'times':['4:55pm - 5:25pm', '5:40pm - 6:10pm', '6:20pm - 6:50pm'], 'price': '39'},
{'day': 'Tuesday & Thursday', 'dates': ['9/1-9/29', '10/1-10/29'], 'times':['4:55pm - 5:25pm', '5:40pm - 6:10pm', '6:20pm - 6:50pm'], 'price': '59'},
{'day': 'Saturday', 'dates': ['9/12 - 11/21 No Class Oct 31'], 'times':['11:00am - 11:30am', '11:35am-12:00pm'], 'price': '65'}
];
$scope.concat = function()
{
var concat = [];
var fullDates = []
for (var z = 0; z<= top.length - 1; z ++)
{
var dates = top[z].dates;
var day = top[z].day;
//return dates;
for(var i = 0; i<=dates.length - 1; i++)
{
//concat.push(day.dates[i]);
concat.push(day + ' ' + dates[i]);
fullDates.push(dates[i])
}
$scope.fullDates = fullDates;
}
return concat;
};
HTML:
<select name="days" id="#preschool" ng-model="selectedgroup">
<option ng-repeat="days in concat() track by $index" value="{{fullDates[$index]}}">
{{days}}
</option>
</select>
Select A Time:
<select name="times" id="times" ng-model="selectedTime">
<option ng-repeat="time in times| filter: {dates: selectedgroup}" value="{{$index}}">
{{time.times}}
</option>
</select>

<select>tag you should useng-options.