JSFiddle - React, Tailwind, and code Playground

by davekr

HTML

<div ng-app="myapp" ng-controller="MyCtrl">
    <my-directive test="true"></my-directive>
</div>


<script type="text/javascript" src="http://docs.angularjs.org/angular-resource-1.0.1.min.js"></script>

JavaScript

var myapp = angular.module('myapp', []);
myapp.directive('myDirective', function() {
    return {
        restrict: 'E',
        scope: {
            newattribute: '='
        },
        template: '<input type="text" />',
        link: function(scope, el, attrs) {
            alert(attrs.test == true);
        }
    }
});
function MyCtrl($scope) {};