superdesk/superdesk-client-core

View on GitHub
scripts/core/directives/AutofocusDirective.ts

Summary

Maintainability
A
0 mins
Test Coverage
export default angular.module('superdesk.core.directives.autofocus', [])
    /**
     * @ngdoc directive
     * @module superdesk.core.directives
     * @name sdAutoFocus
     * @description sdAutoFocus automatically focuses on an element on page render.
     */
    .directive('sdAutoFocus', () => ({
        link: function($scope, element, attrs) {
            element.focus();
        },
    }));