I have this directive for my ld Client. I tried to use it inside an ng-repeat but it wont work. What is the problem with this one? how can i make it work?
Tried to add the directive outside of ng-repeat and its working.
ldClient is a api variable in other module which returns true or false base on the flag variation.
Actually It doesnt even evaluate the directive like it not even calling it when its inside the ng-repeat
app.directive('flag', function (utilService) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
ldclient.on('ready', function() {
var flag = false;
console.log(element);
flag= ldclient.variation(attrs.flag, false);
if(flag == false){
element.remove();
}
});
}
}
});