I am trying to send the getBoundingClientRect () element to my component this way:
<object [fromTop]="element.getBoundingClientRect().top"></object>
In my html component I am doing this since I received a note saying that it was "unsafe"
this.fromTop = this.sanitizer.bypassSecurityTrustStyle(this.fromTop); <div style="position:absolute;top:{{fromTop}}px;">Top:{{fromTop}}</div>
But after adding the disinfectant, I get the following message:
SafeValue should use [property] = binding:
What happened? How can I let my object be in the absolute position equal to the vertex: {{fromTop}}px?
source share