content-loader icon indicating copy to clipboard operation
content-loader copied to clipboard

How to provide a skeleton definition file path to content-loader

Open ln56b opened this issue 3 years ago • 0 comments


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:

Current behavior

I would like to extract all svg definition from the template to a "skeleton library file" so as to keep my template as clean as possible and let the skeleton library file take care of the skeleton definitions.

I guess I am looking for similar behaviour as the <use> element in <svg> with ahrefattribute that could be the location of my skeleton definition in the library file.

Expected behavior

Ultimately I would only add the content-loader and props into my template, something like :

 <content-loader
      [viewBox]="viewBox"
      baseUrl="pathToMyFile.svg#{{ icon }}"
    >
    </content-loader>

The "skeleton library file" would contain a list of skeleton definition for ex :

<svg:rect id="skeleton-one" x="0"
                y="0"
                rx="4"
                ry="4"
                width="60"
                height="20" />

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Is there any way to get that abstraction to separate the skeleton definition from the template ?

Environment


Angular version:14.0.3


Browser:
- [x] Chrome (desktop) version 108.0.5359.94
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 

ln56b avatar Dec 07 '22 15:12 ln56b