20 lines
393 B
Plaintext
20 lines
393 B
Plaintext
|
|
||
|
<h1>onDestroy</h1>
|
||
|
<h2>(const)</h2>
|
||
|
<div>
|
||
|
<p>Notify a directive whenever a <a href='View-var.html'><code>View</code></a> that contains it is destroyed.</p>
|
||
|
.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.
|
||
|
}
|
||
|
}
|
||
|
</div>
|