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

php - How to display all orders for a single product showing the most recent first? Woocommerce -

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

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -