JSFiddle - React, Tailwind, and code Playground

HTML

<body ng-app="animateApp">
    <form name="myForm" ng-controller="Ctrl">
        <div ng-repeat="element in elements">
            <input name="foo_{{$index}}" ng-model="foo" type="number">
        </div>
        <input type="button" value="click here to have access of the third element and change its value to 6"
        ng-click="test()" />
    </form>
</body>

JavaScript

var animateAppModule = angular.module('animateApp', []);
animateAppModule.controller('Ctrl', function ($scope) {
    $scope.elements = ["1", "2", "3"]
    $scope.test = function () {
        var element = myForm.foo_2;
        console.log(element);
        angular.element(element).scope().foo = 6;
    }
})