1

Say I have multiple directives that I use often.

It would be very convenient if I could simply create another directive, that would simply apply all the other directives on the very same element I applied it to at once.

I tried looking around, but could not find any straight forward solution to that.

Do note: I don't want to add a wrapping element, I want to apply the other directives to the same element that used my directive.

I'd love to know how this could be done.

Mistalis
  • 17,145
  • 13
  • 72
  • 95
Radicate
  • 2,814
  • 6
  • 23
  • 35

1 Answers1

0

Directives can't currently be added/removed dynamically.

I think there are more but these issues seem somewhat related.

https://github.com/angular/angular/issues/11716 https://github.com/angular/angular/issues/8785

Günter Zöchbauer
  • 558,509
  • 191
  • 1,911
  • 1,506