How to interpolate multiple directives at once? #4090
Unanswered
electrovir
asked this question in
Q&A
Replies: 2 comments 6 replies
-
Using an array directly won't work as the value in the expression needs to be a directive result. I don't think there's an easy way to combine multiple directives like this. You might do a helper that creates a single directive from other directive classes passed in but that'll be tricky if your directives need to take arguments. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Can I ask what the goal here is? Why do you think it's cleaner to put the directives in an array? Are you sharing them? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm looking for a way to clean up my element templates that have lots of directives in them. I'd love to apply all the directives in a single interpolation so I can extract them elsewhere.
Example with lots of directives:
Desired cleaned version:
Currently the "desired outcome" does not work. Is there a way to make it, or something similar, work?
Beta Was this translation helpful? Give feedback.
All reactions