JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myApp">
<my-snippet></my-snippet>
blah blah<br>
<my-snippet></my-snippet>
</div>
JavaScript
angular.module("myApp", [])
.directive("mySnippet", function () {
return {
restrict: 'E',
template: '<div>This is a snippet</div>',
replace: true
};
});