return {
restrict : "AC",
template : + '<div> '
+ ' <span class="smallFont" data-ng-hide="dossierItem.itemDetail.pubdate">{{ item.createdOn | hbdatetime }}</span>'
+ ' <span class="smallFont" data-ng-show="dossierItem.itemDetail.pubdate">{{ item.itemDetail.pubdate | hbdatetimepubdate }}</span>'
+ ' </div>',
link : function(scope, elm, attrs) {
scope.$watch(attrs.itemList, function(value) {
elm.text(value);
});
}
I can see both dates are loading in the inspect element.But it is always showing create date on the view. I am showing a detailed info while clicking on this ,if i do that it will display the correct one in both places .
But not sure why ng-hide is not working in directive .
Please suggest