merge ngClass attributes when replace true
问题 Here is my directive which has replace: true set on directive definition <my-custom-tag> </my-custom-tag> this is the directive template <div data-ng-class="{'class1': condition1, 'class2': condition2}"> </div> Now if the use my directive as follows it throws up error <my-custom-tag data-ng-class="{'class3': condition3}"></my-custom-tag> The reason being, since the template also defines a data-ng-class attribute, the emitted HTML is as follows <div data-ng-class="{'class3': condition3} {