DOM not updating from component variable in real time

I have a scroll listener in my pages component which observes the content scroll event and updates variables on the component.

this.content._scroll.scroll.asObservable().subscribe((event) => {
  var scrollInRem = event.scrollTop / 14;
  this.newHeight = this.initialHeight - scrollInRem;
  if (this.newHeight <= 8) {
    this.newHeight = 8;

  this.newMargin = this.initialMargin - scrollInRem * 0.4;
  if (this.newMargin <= 0.5) {
    this.newMargin = 0.5;

These variables are accessed in the view with:

[ngStyle]="{'margin-top': getMargin()}"

  initialMargin: number = 5;
  newMargin: number = this.initialMargin;
  getMargin = function () {
    return this.newMargin + "rem";

However recently after updating to RC-4, the new style is not applied to the element all the way through the scroll event, and only applies at the end (or when a new touch or scroll event begins). I know that the observable is getting hit all the time throughout the scroll as the positions are getting logged… anyone know why the view isn’t updating?

I think this is the old type of syntax before angular 2 got released

I use this [style.transform]=" 'translate3d(0,' + this.distanceDown + 'px,0)'"

also I use it to scale views/elements


I hope it works for you

Thanks for your reply. Both [ngStyle] and [style.prop] seem to have the same outcome. I think it is a problem with the view not listening to the updates fast enough as opposed to the property binding, not sure how to completely diagnose it though.