ng-inline-svg
ng-inline-svg copied to clipboard
Any option to get the SVG without the div wrapper?
Hi, For design reasons I want to get SVG without any wrapper, Is there any way to do it? Like ng-container, who does not appear at all in the DOM.
Thanks!!
You should be able to use the inline-svg
component IIRC.
Thank you for your response! 😊 IDK why but angular don't recognize that component. (but do recognize the directive).
I tried these two options:
<inline-svg [inlineSVG]="'assets/img/icons/label.svg'"></inline-svg>
<inline-svg></inline-svg>
Got the following error:
Whoops sorry. I think it's still the directive, but using the injectComponent
and replaceContents
inputs.
I'm sorry for the late response... but the solution does not remove the wrapper div..
Sorry, it's been a long time since I originally wrote this and I barely look at it nowadays. I don't think there's a way to just flat out replace your own "wrapper" element that's being used to actually apply the directive, but I also haven't used Angular in years so I wouldn't be the best person to give advice about that either.
Oh, wow, thank you for the effort and for your time! And thanks for building this package.
This would be a very nice addition since that div wrapper makes the styling of the SVG a lot trickier.