I have a directive that uses jquery to disable all child elements inside a div. Because it's a big page with a lot of controls, I am using ng-include to point to other html markups. The issue I'm encountering is that in some way the content of my div loads after my jquery from my directive applies. I cannot use fieldset with ng-disabled because this app is designed on purpose for IE and IE does not support ng-disabled on fieldset (yeah...I know...sad, but it's a company policy).
angular directive:
app.directive('jqDisable', function() {
var linkFunction = function(scope, element, attributes) {
$(element).find('*').attr("disabled", true);
};
return {
link: linkFunction
}
});
html markup:
<div ng-include src="'schedulerOneTimeOccurence.html'" jq-disable="true">
</div>
plunker link: http://plnkr.co/edit/jc9eCA?p=preview
Thx