.l-main-section
h2 onDestroy variable
p(class="module") exported from angular2/annotations
:markdown
Notify a directive whenever a [View] that contains it is destroyed.
## Example
```
@Decorator({
...,
lifecycle: [onDestroy]
})
class ClassSet {
onDestroy() {
// invoked to notify directive of the containing view destruction.
}
}
```