You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$destroy - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM element before it is removed.
3rd party libraries depend on this: see $mdMenu fron AngularJS Material.
How to implement:
In compile do: this.setState({ compiledElement: $injector.get('$compile')(element)(this.state.scope) });
In componentWillUnmount do angular.element(this.state.compiledElement).empty();
The text was updated successfully, but these errors were encountered:
Currently,
componentWillUnmount
only callsthis.state.scope.$destroy()
.It should also "destroy" the compiled element so
$destroy
is trigger: https://docs.angularjs.org/api/ng/function/angular.element#events3rd party libraries depend on this: see $mdMenu fron AngularJS Material.
How to implement:
compile
do:this.setState({ compiledElement: $injector.get('$compile')(element)(this.state.scope) });
componentWillUnmount
doangular.element(this.state.compiledElement).empty();
The text was updated successfully, but these errors were encountered: