Binding get and set property in Angular 2
<p>I have get and set properties named <code>position</code>. I have a position saved in a variable <code>positionInPerc</code> that has position stored in percentage(%) and it has a default some default value. By position I mean the position of a div. <code>get position</code> will take value from <code>positionInPerc</code> and convert the position from percentage to pixel and return it. <code>set position</code> will take value in pixel and convert it to % and set the value to variable <code>positionInPerc</code>.</p>

<p>Code :</p>

<p>In component -</p>

<pre><code>private positionInPerc:number;
public get position() : number {
    return this.Helper.convertFromPercToPx(this.positionInPerc);
}
public set position(value){
    var converted = this.Helper.convertFromPxToPerc(value);
    this.positionInPerc = converted;
}
</code></pre>

<p>And in HTML -</p>

<pre><code>&lt;div [style.top.px]="position"&gt; Hello &lt;/div&gt;
</code></pre>

<p>Problem is that <code>get position</code> is called initially. But set is not called when the position of the div is changed. div's position is changed by dragging the element. Is it supported in Angular 2? If not, is there any other way I can achieve this? </p>

<p>Any help or suggestion is appreciated.
Thanks </p>