2015-06-01 23:18:32 -07:00

22 lines
473 B
Plaintext

<h1>onInit</h1>
<h2>(const)</h2>
<div>
<p>Notify a directive when it has been checked the first itme.</p>
<p>This method is called right after the directive&#39;s bindings have been checked,
and before any of its children&#39;s bindings have been checked.</p>
<p>It is invoked only once.</p>
.l-main-section
h2 Example:
pre(class="prettyprint linenums")
code.
@Directive({
selector: '[class-set]',
lifecycle: [onInit]
})
class ClassSet {
onInit() {
}
}
</div>