.l-main-section h2 onDestroy variable p.location-badge. exported from angular2/annotations defined in angular2/src/core/annotations_impl/annotations.ts (line 1019) :markdown Notify a directive whenever a View that contains it is destroyed. ## Example ``` @Directive({ ..., lifecycle: [onDestroy] }) class ClassSet { onDestroy() { // invoked to notify directive of the containing view destruction. } } ```