JSFiddle - React, Tailwind, and code Playground

by laszlooo

HTML

<body ng-app="app">
  <div ng-controller="application">
    Összes termék:<br> Termek:

    <input name="sum_termek" value=""> ID:
    <input name="sum_id" value=""> Ár
    <input name="sum_ar" value="">

    <div class="form">
      <table>
        <tr>
          <td>Termék</td>
          <td>ID</td>
          <td>Ár</td>
        </tr>
        <tr>
          <td><input name='product' value=""></td>
          <td><input name='id' value=""></td>
          <td><input name='price' value=""></td>
          <td><button  ng-click="delete($event)">Törlés</button></td>
        </tr>
      </table>
      <button  ng-click="add()">
       Hozzáadás
      </button>
    </div>
  </div>

  <script type="text/html" id="template">
    <tr>
      <td><input type="text" name=""></td>
      <td><input type="text" name=""></td>
      <td><input type="number" min="1" step="1" ng-model="quantity" name=""></td>
      <td><button ng-click="delete($event)">Törlés</button></td>
    </tr>
  </script>
</body>

CSS

table {
  margin: 50px 0px;
  background: grey;
}

JavaScript

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

$app.controller('application', ['$scope', '$compile', function($scope, $compile) {
  //template = $("#template").html();
	//var template = angular.element(document.querySelector('#template'));

  $scope.delete = function(e) {
    //$(e.target).parent().parent().remove();
  }
  $scope.add = function() {
  	console.log("ud");
    //tbody = $("table").append(template);
    //$compile(tbody)($scope);

  }
  $scope.next = function() {
    // body...
  }
}])