AngularJs Directive Template with ng-transclude cannot be compiled
问题 I am trying to create two directives. The first directive appends other predefined angular directives (ng-click and ng-class) to the element and then compiles it so that they work. The second directive replaces an element for a template which contains the first directive. I use ng-transclude to carry the element's contents over to the template. The problem is that once the template from directive 2 is added the first directive tries to compile and throws a wobbly: "TypeError: undefined is not