﻿'use strict';

// Scrolls to top after element was rendered.
app.directive('scrollToTopOnRendered', ['$timeout', '$anchorScroll', function ($timeout, $anchorScroll) {
    return {
        restrict: 'A',
        link: function (scope, element, attributes) {
            $timeout(function () { // Executes after the DOM has completed rendering.
                $anchorScroll();
            });
        }
    };
}]);