JSFiddle - React, Tailwind, and code Playground

by sqiudward

HTML

<div ng-app="SuperHero">

    <super-man dt="[1,2,3]"></super-man>
</div>

JavaScript

var app = angular.module('SuperHero',[]);
app.directive('superMan',function(){    
    return{
        restrict:'E',
        template: function(e,a){
        	
          console.log(a);
          
          var t = JSON.parse(a.dt);
          
          return "<h1>" + t[1] + "<h1>";
        }
    }
});