22 lines
473 B
Plaintext
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's bindings have been checked,
|
|
and before any of its children'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>
|