Notify a directive whenever a View
that contains it is destroyed.
.l-main-section
h2 Example
pre(class="prettyprint linenums")
code.
@Directive({
...,
lifecycle: [onDestroy]
})
class ClassSet {
onDestroy() {
// invoked to notify directive of the containing view destruction.
}
}