JSFiddle - React, Tailwind, and code Playground

by ucuncubayram

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/redmond/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<div ng-app="app">
    <location lon="23.52" lat="42.12"></location>
</div>

JavaScript

var app = angular.module("app",[]);

app.directive("location", function(){
	return {
        restrict: "E",
        link: function(scope, element, attribute){
            scope.lon = attribute.lon;
            scope.lat = attribute.lat;
        },
        template: '<div>Lon: {{lon}},  Lat: {{lat}}</div>'
    }
});