JSFiddle - React, Tailwind, and code Playground

by GruffBunny

HTML

<div ng-app='MyModule' ng-controller="MyController">
    <my-directive identifier="person.lname"></my-directive>
    <p>{{person | json}}</p>
</div>

JavaScript

angular.module('MyModule', [])

.controller('MyController', function( $scope ) {
    $scope.person = {
        lname: 'bunny'
    };
})

.directive('myDirective', function() {
  return {
    scope: {
      'identifier': '='
    },
    restrict: 'E',
      template: '<input id="{{identifier}}" name="{{identifier}}" ng-model="identifier">'
  };
});