JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myApp">
{{1+1}}
<rpt-closing closing-begin-ts="'None'" closing-end-ts="'2014-11-25 23:59:59'">
</div>
JavaScript
app = angular.module('myApp',[]);
app.directive('rptClosing',function(){
return {
restrict:'E',
scope: {
closingBeginTs: '=',
closingEndTs: '='
},
link: function(scope, element, attrs) {
console.log('scope = ', scope);
console.log('scope.closingBeginTs = ', scope.closingBeginTs);
console.log('scope.closingEndTs = ', scope.closingEndTs);
if (scope.closingBeginTs == 'foo')
scope.contentUrl = 'foo.html';
else
scope.contentUrl = 'bar.html';
},
template: '<div ng-include="contentUrl"></div>'
};
});