JSFiddle - React, Tailwind, and code Playground
by DavidSlavik
HTML
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<div ng-controller="timeController">
<time-reminding hours="1"></time-reminding>
{{foo}}
</div>
pokus
JavaScript
var myModule = angular.module('myModule', []);
myModule.directive('timeReminding', function() {
return {
template: "<div>{{hours}}</div>",
scope: {
myHours: '=hours'
},
replace: true,
restrict: "E",
constroller: function($scope){
alert($scope.myHours);
}
}
});
function timeController($scope) {
$scope.foo = 10;
});