I have a question regarding form validation. It is not working for me in the following scenario:
I have a global form, inside the form dynamic fields are rendered us
I found solution for this issue, in this Q & A: AngularJS: Error: No controller: form. The trick is:
Here is the changed code snippet:
directive = '<div>'+directive+'</div>';
// Do Not compile the element NOT beeing part of the DOM
//$(element).append($compile(directive)(scope));
// Firstly include in the DOM, then compile
var result = $(directive).appendTo(element);
$compile(result)(scope);
Here is working jsfiddle