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