push-based / ngx-fast-svg

📦 SVGs, fast and developer friendly in Angular
58 stars 5 forks source link

Allow injectables in the `url` function #76

Closed exequiel09 closed 1 month ago

exequiel09 commented 1 month ago

Description

To ensure we're able to be able configure the URL generated, allow inject function to be called in the url function so that one can retrieve configuration values from Angular's DI system

exequiel09 commented 1 month ago

I noticed that removing the / prefix URL in the url makes the injectable class passed in svgLoadStrategy https://github.com/push-based/ngx-fast-svg?tab=readme-ov-file#advanced-usage gets triggered and that allows for inject to be done in the class

exequiel09 commented 1 month ago

Closing as there's a workaround as highlighted above