Angular: How to use local json with my content/assets?
Hi, maybe is very basic question but I don't know. I had a project in React and I was trying to do the same in Angular.
My JSON is like this:
I have my assets in the correct path and mi files but always I have the same error that my path is incorrect.
What I'm doing wrong? Should I need do something in
Thanks!
My JSON is like this:
//Import CV File
import cvES from "../assets/files/CV.pdf";
//Import Background Header
import bgHeader from "../assets/img/bg-header.jpg";
const allContentES = {
header: {
name: "asdsda.",
surname: "asdasdasd",
profession: "Web Developer",
location: "Argentina",
mobile: "(+34) 123 456 789",
urlCV: cvES,
bgHeader: bgHeader,
social: [
{
name: "Instagram",
url: "https://www.instagram.com/blablabla",
},
{
name: "LinkedIn",
url: "https://www.linkedin.com/in/blablabla",
},
{
name: "GitHub",
url: "https://www.github.com/blablabla",
},
],
textDownloadCV: "asdasd",
titleTimeline: "asdasd",
language: "Change to English",
},I have my assets in the correct path and mi files but always I have the same error that my path is incorrect.
Cannot find module "../../assets/files/CV.pdf" and its corresponding type declarationsWhat I'm doing wrong? Should I need do something in
angular.json or do it different?Thanks!