angular-bootstrap3-datepicker
angular-bootstrap3-datepicker copied to clipboard
Memory leaking
I noticed that memory was leaking while switching back and forth between pages that included the datepicker. The DOM Node Count in Google Chrome kept going up.
I solved it by including the following snippet before returning from the link function:
$scope.$on('$destroy', function() {
if(input.data("DateTimePicker")) {
input.data("DateTimePicker").destroy();
}
element.off("change.dp");
});
Hey great, can you provide a PR for this I'll be happy to merge it