Adding row dynamic

Adding row in a table, using angularJS onclick event, inserting the row next to the clicked row

by sendil J

HTML

<body ng-app="">

</body>
<table border="1" ng-controller="insertRow">
<tbody>
  <tr>
    <td><button ng-click="addRow()" type="button">
      +
    </button>User 1</td>
  </tr>
   <tr>
    <td>User 2</td>
  </tr>
  
   <tr>
    <td>User 3</td>
  </tr>
</tbody>
</table>

JavaScript

function addrow($scope){
	$scope.addRow = function($event){
  		alert($event);
  }
  
};