jkuri/ngTimepicker

Updating model from controller does not update control

Closed this issue · 2 comments

$scope.time = '12:00';

Does not cause the control to update. Seems it's one-way binding.

Is there are fix for this?

Thanks

Fixed using this code:

               scope.$watch(attrs['ngModel'], function (newTime) {
                    scope.initTime = newTime;
                    reinitTime();
                });
jkuri commented

Glad you solved it, perhaps ngModel.$render = function () ... would be better, I think.