Angular2 DOMContentLoaded, Lifecycle Hook
<p>Im working with angular 2 (TS) and need some help:</p>

<pre><code>     constructor(public element:ElementRef){}  
     ngOnInit(){
       this.DOMready()
     }  

     DOMready() {
       if (this.element) {
         let testPosition = this.element.nativeElement.getElementsByClassName("_mypost");
         console.log(testPosition);
         for (let i = 0; i &lt; testPosition.length; i++) {
         console.log(testPosition[i]);
         }
     }else {
        setTimeout(this.DOMready, 100)
    }
</code></pre>

<p>My problem is:<br>
1) I can't properly catch time when document loaded and was prepeared to work with it (this code is the best what i have and yes, i tryed angular2 lifecycle Hooks...)<br>
2) console.log(testPosition) - give the list that i want (with length 10),<br>
but if it change on console.log(testPosition[0]) it give undefined. And my console.log(testPosition[i]) print nothing.<br>
Thx)</p>