JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="app">
    <form>
        <input focus type="text" />
        <input focus type="text" />
        <input focus type="text" />
    </form>
</div>

JavaScript

var app = angular.module('app', []);
app.directive('focus', function () {
    return {
        restrict: 'A',
        link: function ($scope, elem, attrs) {

            elem.bind('keydown', function (e) {
                elem.next()[0].focus();
            });
        }
    }
})