JSFiddle - React, Tailwind, and code Playground

by Gajus Kuizinas

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.8/angular.min.js"></script>
<div ng-app="foo">
    <div ng-bind="1+1"></div>
    <div gajus-bar>
        I will be replaced.
    </div>
    <div gajus-bar-misspelled>
        I will remain in the DOM.
    </div>
</div>

JavaScript

angular
    .module('foo', [])
    .directive('gajusBar', function () {
        return {
            restrict: 'A',
            template: 'BAR'
        }
    });