JSFiddle - React, Tailwind, and code Playground

by gogirl

HTML

<body ng-app='app'>
    <h4>As default used as attributes</h4>
    <div m-d></div>
    <div m-d1></div>
     <m-d1></m-d1>
    <p m-d1></p>
</body>

JavaScript

//Easy to forget:
//'' in params od the DI array
//to declare the module and its dependencies
angular.module('app', ['app.mD', 'app.mD1']);

angular.module('app.mD', []).directive('mD', function () {
    return {
        template: 'Similar to ng-include: tag will not work as element'
    };
});

angular.module('app.mD1', []).directive('mD1', function () {
     return {
        template: 'Similar to ng-include: tag will not work as element'
    };
});