Fix: Move SVG to public folder for Angular 21 asset serving

This commit is contained in:
2026-02-14 14:26:15 -05:00
parent f900889953
commit 244f379592
3 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,8 @@
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "npm"
"packageManager": "npm",
"analytics": false
},
"newProjectRoot": "projects",
"projects": {

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@@ -14,7 +14,7 @@ export class MapSvgComponent implements AfterViewInit {
ngAfterViewInit(): void {
// Load SVG file and inject it into the component
this.http.get('assets/map-image.svg', { responseType: 'text' }).subscribe({
this.http.get('map-image.svg', { responseType: 'text' }).subscribe({
next: (svgContent) => {
const container = this.elementRef.nativeElement.querySelector('.svg-container');
if (container) {