Angular directive how to add an attribute to the element?
A directive which adds another directive to the same element: Similar answers: How to get ng-class with $dirty working in a directive? creating a new directive with angularjs Here is a plunker: http://plnkr.co/edit/ziU8d826WF6SwQllHHQq?p=preview app.directive(“myDir”, function($compile) { return { priority:1001, // compiles first terminal:true, // prevent lower priority directives to compile after it compile: function(el) { … Read more