JSFiddle - React, Tailwind, and code Playground

by Luqman Rom

HTML

<div ng-app="myApp">
<div my-directive
     my-url="http://google.com"
     link-text="Click me"></div> 
</div>

JavaScript

angular.module('myApp', [])

.directive('myDirective', function() {
  return {
    restrict: 'AE',
    replace: true,
    scope: {
      myUrl: '@',
      myLinkText: '@linkText'
    },
    template: '<a href="{{myUrl}}">{{myLinkText}}</a>'
  };
});