In AEM 6.2, I want to import a component using 'data-sly-resource' like so:
<div id="email" data-sly-resource="${'text' @ resourceType='/libs/foundation/components/form/text'}"></div>
In this code, resourceType is used to reference the path to the component, and thus not set as a property on the imported component.
If I use this, the imported component does not have a resourceType defined. How can I define the resourceType of the imported component?
This isn't a valid resource type. The resource type of the component defined at /libs/foundation/components/form/text
is foundation/components/form/text
. Given this resource type, Sling will find the relevant scripts in /libs/foundation/components/form/text
or an overlay somewhere in /apps
if one is present.