Adding attribute to ion-content dynamically

Trying to bind on-scroll-complete attribute to ion-content. Adding this attribute manually across all pages works fine.

Is there a way to add this dynamically like this:

ChronusApp.directive('ionContent', ['$compile', function({
  return {
    restrict: 'E',
    replace: true,
    scope: false,
    compile: function($element, $attr) {
      $element[0].setAttribute('on-scroll-complete', "scrollToTop()");
    }
  }
}])