Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 5e8d1c2

Browse files
committed
Merge branch 'coverbeckApigee-leakingscopes' into dev
Conflicts: dist/angular-datatables.min.js
2 parents c55b524 + cd7754a commit 5e8d1c2

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

dist/angular-datatables.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererServic
895895
var _oTable;
896896
var _$elem;
897897
var _parentScope;
898+
var _newParentScope;
898899
var dtInstance;
899900
var renderer = Object.create(DTRenderer);
900901
renderer.name = 'DTNGRenderer';
@@ -957,10 +958,14 @@ function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererServic
957958
}
958959

959960
function _destroyAndCompile() {
961+
if (_newParentScope) {
962+
_newParentScope.$destroy();
963+
}
960964
_oTable.ngDestroy();
961965
// Re-compile because we lost the angular binding to the existing data
962966
_$elem.html(_staticHTML);
963-
$compile(_$elem.contents())(_parentScope);
967+
_newParentScope = _parentScope.$new();
968+
$compile(_$elem.contents())(_newParentScope);
964969
}
965970
}
966971
}

0 commit comments

Comments
 (0)