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,793
  • 13
  • 73
  • 97
Radicate
  • 2,934
  • 6
  • 26
  • 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
  • 623,577
  • 216
  • 2,003
  • 1,567