Expand my Community achievements bar.

Sly-resource won't place class selectors in preview mode

Avatar

Level 2

I use data-sly-resource like this.

The goal is to create a component where you can pick a begin date and an end date.

<div>
   van:

   <div>
  <sly data-sly-resource="${'./date1' @ resourceType='fd/af/components/guidedateinput'}"/>
  </div>
   tot:

   <div>
  <sly data-sly-resource="${'./date2' @ resourceType='fd/af/components/guidedateinput'}"/>
  </div>
</div>

The problem im having is that the class selectors aren't placed on the html tags for the date input component in preview mode.

And because of that the css isn't loaded.

This is edit mode.

Screen Shot 2017-11-13 at 10.39.11.png

This is preview mode.

Screen Shot 2017-11-13 at 10.39.40.png

Thanks

12 Replies