In my scenario, I’m basically creating a component around another component, and that inner component has attributes that govern its behavior; I’m hoping there’s a way that my outer component can decide which attributes to apply to the inner one, declaratively or programmatically, but from what I’m reading this may not be a supported thing?
#Dynamically apply attributes?
8 messages · Page 1 of 1 (latest)
You should clarify what you mean, with a concrete example, because inputs are meant to be passed to components, and of course other components do that, and inputs can of course have a dynamic value, so I'm not sure what you're asking.
Specifically, it’s a kendo control where different types of grouping behavior are determined not by an input but from the existence of specific attributes
Like single-token directives? I don’t know what they’re called exactly
You should clarify what you mean, with a concrete example. Don't leave us in the dark. If you're thinking about a kendo control with specific attributes, share the link to the documentation/code of that kendo control and of those specific attributes.
Learn more about the Kendo UI for Angular MultiSelectTree and use the component in Angular projects.
“kendoMultiSelectTreeExpandable” in that example would be one of them, but there are several
What you are referring to are attribute directives https://angular.io/guide/attribute-directives
I don't believe you can conditionally apply directives so you may have to try an approach that uses ngTemplates + some structural directives.
https://stackoverflow.com/a/47725361
https://angular.io/api/common/NgTemplateOutlet