JSFiddle - React, Tailwind, and code Playground
by yonet3d
HTML
<body ng-app="myApp">
<div ng-controller="MainController">
<globe info="world">{{world}}</globe>
</div>
</body>
CSS
</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.js"></script> <style>
JavaScript
angular.module('myApp', [])
.controller('MainController', function($scope){
$scope.world = {name: 'earth'};
})
.directive('globe', function() {
return {
restrict: 'E',
scope: {
globe: '=info'
},
template:'Hello, {{globe.name}}'
}
})