JSFiddle - React, Tailwind, and code Playground

by tridip

HTML

<div ng-app="myApp" ng-controller="myCtrl">
<table border=2>
<tr>
<td colspan=5><input type=text ng-model="Operantion" id="txtData" style="width:97%" ng-change="GetData(Operantion,'onChange')"></td>
</tr>
<tr>
<td><input type=button value="+" ng-click="GetData('+','btnClick')"></td>
<td><input type=button value="-" ng-click="GetData('-','btnClick')"></td>
<td><input type=button value="x" ng-click="GetData('*','btnClick')"></td>
<td><input type=button value="/" ng-click="GetData('/','btnClick')"></td>
<td><input type=button value="=" ng-click="GetData('=','btnClick')"></td>
</tr>
</table>
</div>

JavaScript

var app = angular.module('myApp', []);
    app.controller('myCtrl', function ($scope) {
        $scope.GetData = function (arg1, evtType) {
            if (evtType === 'btnClick') {
                angular.element("#txtData").focus();
            }
        };
    });