You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a custom Library with Angular Cli. It has the following structure:
dist
projects
customLib
src
assets
icons
lib
button
The button component gets as Input() the name of the svg icon that will be displayed inside the button: this.svgIconUrl = '../../assets/icons/' +this.icon + '.svg';
I made a script which copy all icons (stored in src/assets/icons) and paste it inside dist folder. All this is working fine. Then, I published my library on bitbucket and I installed it in another Angular Application.
The Library is imported correctly, but angular-svg-icon cannot find the svg because it is taking the svg in localhost:4200/#/assets/icons/myicon.svg
And of course it doesn't find the svg, because it is inside the library, so it is inside the "node_modules" folder. How can i force the button component of Library to take the svg inside the Library, so with a relative path?
The text was updated successfully, but these errors were encountered:
I created a custom Library with Angular Cli. It has the following structure:
The button component gets as Input() the name of the svg icon that will be displayed inside the button:
this.svgIconUrl = '../../assets/icons/' +this.icon + '.svg';
I made a script which copy all icons (stored in src/assets/icons) and paste it inside dist folder. All this is working fine. Then, I published my library on bitbucket and I installed it in another Angular Application.
The Library is imported correctly, but angular-svg-icon cannot find the svg because it is taking the svg in localhost:4200/#/assets/icons/myicon.svg
And of course it doesn't find the svg, because it is inside the library, so it is inside the "node_modules" folder. How can i force the button component of Library to take the svg inside the Library, so with a relative path?
The text was updated successfully, but these errors were encountered: