p.location-badge. exported from angular2/lifecycle_hooks defined in angular2/src/core/compiler/interfaces.ts (line 93) :markdown Notify a directive whenever a ViewMetadata that contains it is destroyed. ## Example ``` @Component(...) class MyComponent implements OnDestroy { onDestroy(): void { // invoked to notify directive of the containing view destruction. } } ``` .l-main-section h2 Members .l-sub-section h3#onDestroy onDestroy pre.prettyprint code. onDestroy() :markdown