diff --git a/src/index.html b/src/index.html index c1b733e..7774ed9 100644 --- a/src/index.html +++ b/src/index.html @@ -305,6 +305,7 @@ + diff --git a/src/scripts/directives/autoFocus.js b/src/scripts/directives/autoFocus.js new file mode 100644 index 0000000..4dbb7ed --- /dev/null +++ b/src/scripts/directives/autoFocus.js @@ -0,0 +1,14 @@ +(function () { + 'use strict'; + + angular.module('ariaNg').directive('ngAutoFocus', ['$timeout', function ($timeout) { + return { + restrict: 'A', + link: function (scope, element) { + $timeout(function () { + element[0].focus(); + }); + } + }; + }]); +})(); diff --git a/src/views/new.html b/src/views/new.html index d1c4d24..4091afa 100644 --- a/src/views/new.html +++ b/src/views/new.html @@ -43,7 +43,7 @@
Download Links: