angularIO.directive('scrollYOffsetElement', ['$anchorScroll', function($anchorScroll) { return function(scope, element) { $anchorScroll.yOffset = element; }; }]);