JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="app" ng-controller="mycontroller">
<div class="mydiv" ng-click="test()">
</div>
<input type="text" ng-model="myinput" id="thebox">
</div>
CSS
.mydiv {
height: 30px;
width: 60px;
background-color: #77cc77;
}
JavaScript
var app = angular.module('app', []);
app.controller('mycontroller', function ($scope) {
$scope.test = function() {
document.getElementById('thebox').focus();
$scope.myinput.focus();
};
});