JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="myApp" ng-controller="myCtrl as mv">
            <div ng-repeat="form in mv.forms">
                {{form.id}}
                <form name="mv.{{form.id}}">
                    <input ng-model="form.text"><br>
                    <a href="#" ng-show="mv[form.id].$dirty" ng-click="mv.reset(form.id, $index)">reset</a>
                </form>
            </div>
</div>

JavaScript

angular.module('myApp', []).controller('myCtrl', function ($scope) {
    var mv = this;
    
    mv.forms = [
    {
        id: "form1",
        text: ""
    },
    {
        id: "form2",
        text: ""
    }];
    
    mv.values = {
        form1: "",
        form2: ""
    };
    
    mv.reset = function (formId, index) {
        mv.text='';
        mv.forms[index].text = "";
        mv[formId].$setPristine();
    }
});