diff --git a/src/angularTemplate.js b/src/angularTemplate.js index a254967..8b0d287 100644 --- a/src/angularTemplate.js +++ b/src/angularTemplate.js @@ -111,6 +111,12 @@ export default class ReactAngular extends React.Component { return false; } + componentWillUnmount() { + if (this.$scope) { + this.$scope.$destroy(); + } + } + render() { const { wrapperTag, className, wrapperAttrs, children } = this.props; const ref = (element) => this.$element = angular.element(element);