JSFiddle - React, Tailwind, and code Playground

by Mohamed Idris

HTML

<body ng-controller="MainController">
    
    <a href="#" class="button" ng-click="addRow()">Add Row</a>
	<form>
    First Name : <input name="myInput" ng-model="user.firstName" required>
	First Name : <input name="myInput" ng-model="user.lastName" required>
	</form>
	 
  
<table>
  <thead>
    <tr>
      <th>Some Header</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="rowContent in rows">
      <td>{{user.firstName}}</td>
      <td>{{user.lastName}}</td>
    </tr>
  </tbody>
</table>

JavaScript

angular.module('MyApp', [])
.controller('MainController', [ '$scope', function($scope) {

  $scope.rows = [];
  
  $scope.counter = 0;
  
  $scope.addRow = function() {
    
    $scope.rows.push('Row ' + $scope.counter);
	
    $scope.counter++;

  }
}]);