I'm trying to load local json file but I keep getting an error:
import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
@Injectable({
providedIn: "root"
})
export class SearchService {
constructor(private http: HttpClient) {}
getJsonFIle() {
this.http.get("./configs/dor.json").subscribe(data => {
console.log(data);
});
}
}
This is the error on the browser:


/assets/configs/dor.json"src/configs"into angular.json file in "assets" array