JSFiddle - React, Tailwind, and code Playground

by fergal_doyle

HTML

<div ng-app="myjs">
    <div>
        <directive-one/>
    </div>
    <div>
        <directive-two/>
    </div>
</div>

JavaScript

try{ angular.module('myjs'); } catch (e) { angular.module('myjs', []); }   
angular.module('myjs').directive('directiveOne', function() {
    return {
      restrict : 'E',
      template : '<span> Directive One</span>',
    }
});

try{ angular.module('myjs'); } catch (e){ angular.module('myjs', []); }  
angular.module('myjs').directive('directiveTwo', function() {
    return {
      restrict : 'E',
      template : '<span> Directive Two</span>',
    }
});