function TapScrollToTopDirective() {
  return ['$document', function($document) {
    return {
      restrict: 'E',
      link: function($scope, $element, $attr, scrollCtrl) {
        ionic.requestAnimationFrame(function() {
          var scrollCtrl = $element.controller('$ionicScroll');
          if (!scrollCtrl) {
            return;
          }

          ionic.on('tap', onTap, $element[0]);
          $scope.$on('$destroy', function() {
            ionic.off('tap', onTap, $element[0]);
          });

          function onTap(e) {
            if (ionic.DomUtil.getParentOrSelfWithClass(e.target, 'button', 4)) {
              return;
            }
            var touch = e.gesture && e.gesture.touches[0] || e.detail.touches[0];
            var bounds = $element[0].getBoundingClientRect();
            if(ionic.DomUtil.rectContains(
              touch.pageX, touch.pageY,
              bounds.left, bounds.top - 20,
              bounds.left + bounds.width, bounds.top + bounds.height)
            ) {
              scrollCtrl.scrollTop(true);
            }
          }
        });
      }
    };
  }];
}
@ngdoc directive
@name ionFooterBar
@module ionic
@restrict E
@controller ionicBar as $scope.$ionicFooterBarController

@description
Adds a fixed footer bar below some content.

Is able to have left or right buttons, and additionally its title can be
aligned through the {@link ionic.controller:ionicBar ionicBar controller}.

@param {string=} controller-bind The scope variable to bind this footer bar's
{@link ionic.controller:ionicBar ionicBar controller} to.
Default: $scope.$ionicFooterBarController.
@param {string=} align-title Where to align the title at the start.
Avaialble: 'left', 'right', or 'center'.  Defaults to 'center'.

@usage
```html
<ion-content>
  Some content!
</ion-content>
<ion-footer-bar align-title="left" class="bar-assertive">
  <div class="buttons">
    <button class="button">Left Button</button>
  </div>
  <h1 class="title">Title!</h1>
  <div class="buttons" ng-click="doSomething()">
    <button class="button">Right Button</button>
  </div>
</ion-footer-bar>
```