-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
This error is called on this line:
$element
.on('dp.change', function (e) {
if (ngModelCtrl) {
$timeout(function () {
ngModelCtrl.$setViewValue(e.target.value); // TypeError: Cannot read property '$$phase' of null
});
}
})
.datetimepicker(options);
I think $setViewValue
should be wrapped in something like this:
$scope.$applyAsync(function() {
ngModelCtrl.$setViewValue(e.target.value);
});
and if should remove listeners by $element.off
with the event handler on $scope.$on('$destroy', ...)
Metadata
Metadata
Assignees
Labels
No labels