angularjs - Dynamically added attributes don't initialise -


i trying dynamically add attributes html elements generated , compiled in ng-repeat statement.

i using following directive on input elements.

.directive('ngloading', function($compile) {   return function(scope, element, attrs) {     scope.$watch(attrs.ngloading, function() {           element.attr('ng-required', true);          element.attr('ng-pattern', '/^[0-9]+$/');           element.removeattr('ng-loading');          $compile(element)(scope);        });   }; }); 

the problem seeing in fact add attribute, ng-required="true" etc. doesn't initialized browser , validation doesn't kick in.


Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -