JSFiddle - React, Tailwind, and code Playground

by chaseme

HTML

<script src="https://storage.googleapis.com/code.getmdl.io/1.0.2/material.min.js"></script>
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.2/material.blue-red.min.css">
<div ng-app="TestApp">
    <div ng-controller="TestCtrl">
        <table class="mdl-data-table mdl-js-data-table mdl-data-table--selectable mdl-shadow--2dp">
            <thead>
                <tr>
                    <th class="mdl-data-table__cell--non-numeric">Material</th>
                    <th>Quantity</th>
                    <th>Unit price</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td class="mdl-data-table__cell--non-numeric">Acrylic (Transparent)</td>
                    <td>25</td>
                    <td>$2.90</td>
                </tr>
                <tr>
                    <td class="mdl-data-table__cell--non-numeric">Plywood (Birch)</td>
                    <td>50</td>
                    <td>$1.25</td>
                </tr>
                <tr>
                    <td class="mdl-data-table__cell--non-numeric">Laminate (Gold on Blue)</td>
                    <td>10</td>
                    <td>$2.35</td>
                    <tr ng-repeat="test in tests">
                        <td class="mdl-data-table__cell--non-numeric">{{test.one}}</td>
                        <td>{{test.two}}</td>
                        <td>{{test.three}}</td>
                    </tr>
                </tr>
            </tbody>
        </table>
    </div>
</div>

JavaScript

var testApp = angular.module('TestApp', []);
testApp.run(function ($rootScope, $timeout) {
    $rootScope.$on('$viewContentLoaded', () => {
        $timeout(() => {
            componentHandler.upgradeAllRegistered();
        })
    })
});

var testdata = JSON.parse('{"0": {"one": "anothertext","two": "ing","three": "something"},"1": {"one": "test","two": "ing","three": "things"}}');

testApp.controller('TestCtrl', ['$scope', '$http', function ($scope, $http) {
    $http.get('/').success(function (data) {
        $scope.tests = testdata;
        componentHandler.upgradeAllRegistered();
    });
}]);