I'm going nuts!
Is it possible to create a directive that renders different times (00:15,00:30,00:45) etc into a select box where my ngModel uses objects for hours and minutes like below?
{
"h" : 1,
"m" : 30
}
My idea is to use ngModel.$formatters, ngModel.$parsers and ngModel.$render to make it possible have bi-directional bindings between the textual representation of the select box and the ngModel.
See JSFiddle http://jsfiddle.net/52kUy/23/
I have been playing with a solution to attach an ng-change to the selectbox but I also need the ng-change to be available in the application to react to time changes.
Note: To simplify the code I have removed padding of the strings (00:15 => 0:15 etc).
Super thankful for any directions.