Supporting Complex Selectors for Transclusion in Components #14709
Description
-
I'm submitting a ...
-
feature request
I have been writing code using AngularJs 1.5.5 components. Please see below Plunker:
Components With Transclusion
I have a <user>
component which can either contain <add-action>
or <update-action>
components. Only one of them will be included at any time. Now I want to transclude these components in main <user>
component at the same transclusion slot.
I can't make any of them as default because there might be a case like view only page where none of them are shown. Both the sub-components are going to contain different buttons.
Problem is I have to use full name of the sub-component like either addAction
OR updateAction
.
what I want is something like a CSS selector which can select any of them. e.g $=action
which will select any element present and having name ending with word "action". Is it possible at all? I have not included actual code but have included sample to demonstrate.