JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.angularjs.org/angular-1.0.0rc4.min.js"></script>
<div ng-app="ComponentDemo">
<div ng-controller="DemoCtrl">
<my-component my-data="data"></my-component>
</div>
</div>
JavaScript
var module = angular.module('ComponentDemo', []);
module.directive('myComponent', function() {
return {
restrict: 'E',
replace: true,
scope: {
myData: 'accessor'
},
template: '<ul><li ng-repeat="name in myData">{{name}}kk</li></ul>'
};
});
function DemoCtrl($scope) {
$scope.data = ['tom', 'bill', 'hank'];
}