From 244f379592540b78632e5fcec9a0f258788a89ac Mon Sep 17 00:00:00 2001 From: shenron Date: Sat, 14 Feb 2026 14:26:15 -0500 Subject: [PATCH] Fix: Move SVG to public folder for Angular 21 asset serving --- angular.json | 3 ++- {src/assets => public}/map-image.svg | 0 src/app/map-svg/map-svg.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename {src/assets => public}/map-image.svg (100%) diff --git a/angular.json b/angular.json index d25f445..ba1b2d7 100644 --- a/angular.json +++ b/angular.json @@ -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": { diff --git a/src/assets/map-image.svg b/public/map-image.svg similarity index 100% rename from src/assets/map-image.svg rename to public/map-image.svg diff --git a/src/app/map-svg/map-svg.ts b/src/app/map-svg/map-svg.ts index e6795f8..1623851 100644 --- a/src/app/map-svg/map-svg.ts +++ b/src/app/map-svg/map-svg.ts @@ -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) {