I found a solution by my self
import { Component, ElementRef, OnInit } from 'angular2/core';
constructor(private elementRef: ElementRef) { }
ngOnInit() {
new Ruler(DOM).measure(this.elementRef).then((rect: Rectangle) => {
console.log(rect);
});
}
Am Mittwoch, 13. April 2016 14:11:20 UTC+2 schrieb Michael Burger:
>
> Hi,
>
> How Can I get the calculated size of my component or a subelement in
> ngOnInit?
>
> My height is 100% but I need to know the effective size on load component.
> Is there a way using Renderer or somehting else?
>
> thx
> Michael
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.