angular.module('tabModule', [])
.directive('tab', function(){
var template = document.getElementById("tab-template").innerHTML;
return {
controller: TabCtrl,
restrict: 'E',
transclude: true,
template: template,
compile: function compile(tElement, tAttrs, transclude) {
return function (scope, iElement, iAttrs, controller) {
iElement.on("click", function(){ controller.onClick() });
}
}
}
});