// no need for the event to do anything more.
event.stopPropagation();
event.preventDefault();
+ scope.closeBox();
+ });
+
+ scope.closeBox = function () {
element.remove();
scope.$destroy();
- });
+ }
}
}
}]);
event.stopPropagation();
event.preventDefault();
if (commentId === scope.comment.id && !scope.isNew) {
- element.remove();
- scope.$destroy();
+ scope.closeBox();
}
});
+
+ scope.closeBox = function () {
+ element.remove();
+ scope.$destroy();
+ }
}
}
}]);