clean up groups-builder directive
This commit is contained in:
@@ -577,12 +577,17 @@
|
||||
}
|
||||
|
||||
|
||||
scope.$watch('model', function(newValue, oldValue) {
|
||||
var unbindModelWatcher = scope.$watch('model', function(newValue, oldValue) {
|
||||
if (newValue !== undefined && newValue.groups !== undefined) {
|
||||
activate();
|
||||
}
|
||||
});
|
||||
|
||||
// clean up
|
||||
scope.$on('$destroy', function(){
|
||||
unbindModelWatcher();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
var directive = {
|
||||
|
||||
Reference in New Issue
Block a user