JSFiddle - React, Tailwind, and code Playground

by Shashank D

HTML

<div ng-app="app" ng-controller="test">
  <div ng-repeat="item in getNumber(key) track by $index">
    <input type="text" ng-model="text[$index]" name="input_{{$index}}" />
    <span ng-if="text[$index]">
    - {{text[$index]}}
    </span>
  </div>
</div>

JavaScript

var app = angular.module('app', []);

app.controller('test', function($scope) {
  $scope.key = 4;
  $scope.getNumber = function(num) {
    return new Array(num);
  }
});