Reputation: 1739
There is a live example from the official doc thats not working: https://angular.io/generated/live-examples/template-syntax/stackblitz.html
The live example error says: Import error, can't find file: ./svg.component.svg
If I download the example and npm install it, I got the error:
ERROR in ./src/app/svg.component.ts
Module not found: Error: Can't resolve './svg.component.svg' in 'C:\Users\Elias\Desktop\New folder\src\app'
The svg.component.ts has this portion of code:
import { Component } from '@angular/core';
@Component({
selector: 'app-svg',
templateUrl: './svg.component.svg',
It seems that the component is asking for an .svg file. I don't know how to get it.
Upvotes: 0
Views: 1404
Reputation: 5267
You are trying to reference a file that don't exist, and you are trying to reference an svg template from a css which also won't work.
Just add a .svg
file containing your svg template to your directory and that should work fine. See the image below.
Upvotes: 1