angular-cn/public/docs/js/latest/api/annotations/onDestroy-const.jade
2015-06-01 23:18:32 -07:00

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>