onFinishRenderDirective.js 352 Bytes
Newer Older
Memorydoc's avatar
#  
Memorydoc committed
1 2 3 4 5 6 7 8 9 10 11
citModule.directive('onFinishRender', ['$timeout', function ($timeout) {
    return {
        restrict: 'A',
        link: function (scope, element, attr) {
            if (scope.$last === true) {
                $timeout(function () {
                    scope.$emit(attr.onFinishRender);
                }, 500);
            }
        }
    }
Ken you's avatar
Ken you committed
12
}]);