onInit

(const)

Notify a directive when it has been checked the first itme.

This method is called right after the directive's bindings have been checked, and before any of its children's bindings have been checked.

It is invoked only once.

.l-main-section h2 Example: pre(class="prettyprint linenums") code. @Directive({ selector: '[class-set]', lifecycle: [onInit] }) class ClassSet { onInit() { } }