AngularJS Example

HTML

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
<div ng-app="tables">
    <div style="display: table;">
        <tr><th>1 Header Row</th></tr>
        <my-row value="2 Element Row"></my-row>
    </div>
</div>

CSS

table {border: 1px solid red;}

JavaScript

angular.module('tables',[])
    .directive('myRow', function() {
        return {
            restrict: 'EA',
            replace: true,
            scope: { value: '@' },
            template: '<tr><td>{{value}}</td></tr>'
        }
    });