I have an array with values of hours which, I present in a tag select as follows:
Select
07:00:00
07:10:00
07:20:00
07:30:00
07:40:00
07:50:00
08:00:00
But I want to know how to group them in the following way:
07:00:00 - 07:10:00
07:10:00 - 07:20:00
07:20:00 - 07:30:00
07:30:00 - 07:40:00
07:40:00 - 07:50:00
07:50:00 - 08:00:00
This is what I have so far:
HTML
<div ng-controller="MyCtrl">
<select ng-model="data.rh"
ng-init="data.rh=rangoHoras[0].h"
ng-options="rh.h as rh.h for rh in rangoHoras"
style="color:#283593;">
</select>
</div>
controller.js
function MyCtrl($scope) {
$scope.rangoHoras=[
{"h":"07:00:00"},{"h":"07:10:00"},{"h":"07:20:00"},
{"h":"07:30:00"},{"h":"07:40:00"},{"h":"07:50:00"},
{"h":"08:00:00"}
];
}