JSFiddle - React, Tailwind, and code Playground

by dave ho

HTML

<h1>Trust Passport Shit</h1>
<reporter page="passport" user="userID" param3="foo"></reporter>

JavaScript

app.directive('reporter', function() {
      return {
        restrict: 'E',
        replace: true,
        template: '<div></div>',
        scope: {
          // create a scope variable called 'photos' bound
          // to whatever was passed in via the 'photos' attribute
          // in the HTML
          photos: '=photos'
        },
        link: function(scope, element, attrs) {
            console.log("hi %o", attrs);
        }
      }
})