MCPcopy Create free account
hub / github.com/angular/angular / onDestroy

Method onDestroy

packages/upgrade/src/common/src/upgrade_helper.ts:146–152  ·  view source on GitHub ↗
($scope: IScope, controllerInstance?: any)

Source from the content-addressed store, hash-verified

144 }
145
146 onDestroy($scope: IScope, controllerInstance?: any) {
147 if (controllerInstance && isFunction(controllerInstance.$onDestroy)) {
148 controllerInstance.$onDestroy();
149 }
150 $scope.$destroy();
151 cleanData(this.element);
152 }
153
154 prepareTransclusion(): ILinkFn | undefined {
155 const transclude = this.directive.transclude;

Callers

nothing calls this directly

Calls 4

isFunctionFunction · 0.90
cleanDataFunction · 0.90
$onDestroyMethod · 0.80
$destroyMethod · 0.65

Tested by

no test coverage detected