JSFiddle - React, Tailwind, and code Playground

by KyleMuir

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.min.js"></script>
<div ng-controller="Controller">
    <div my-customer info="naomi"></div>
</div>

JavaScript

angular.module('docsSimpleDirective', [])
    .controller('Controller', ['$scope', function ($scope) {
    $scope.customer = {
        name: 'Naomi',
        address: '1600 Amphitheatre'
    };
}]).directive('myCustomer', function () {
    return {
        scope: {
            customerInfo: '=info'
        },
        template: 'Name: {{customer.name}} Address: {{customer.address}}',
    };
});