angular load json file with httpclient

Solutions on MaxInterview for angular load json file with httpclient by the best coders in the world

showing results for - "angular load json file with httpclient"
Maya
27 Feb 2020
1import { HttpClient } from '@angular/common/http'; 
2import { Observable } from 'rxjs';
3
4@Injectable()
5export class AppSettingsService {
6
7   constructor(private http: HttpClient) {
8        this.getJSON().subscribe(data => {
9            console.log(data);
10        });
11    }
12
13    public getJSON(): Observable<any> {
14        return this.http.get("./assets/mydata.json");
15    }
16}
17
queries leading to this page
angular http get from json fileangular httpclient get json fileangular read json httpangular http import jsonpread json file angular httpangular httpclient get a local json filehttpclient read json file angularangular http json fileangular http client read json fileangular read local json files using httpclientmodulecall json file angular httpclientread json file using httpclient angularget local json file in my angular project with httpclientangular httpclient read json filejson file in angular get requestangular use httpclient get to get a json file in prodget json data httpclient angularjshow to access json file using httpclient in angular 9 without putting it in assets folderget json data httpclient angularhow to access json file using httpclient in angular 9angular http get jsonangular get data from local json file using httpclientcall api json file angularangular use json file as apihow to read json file in angular 8 using httpangular load json file with httpclientangular http put example json serverangular read json file httpclientset data in json file angular using httpclientangular 10 get http from json filehttp get json file in angularget json via http get angularjshow to get json data from online json file using httpclient in angularhttp get json angularhow to load local json file using http angularangular http local json file by servicesangularjs http get local json fileangular load json data httpangular httpclient read json file no workhttp get json data angularhttpclient read file json angular 11call json file using httpclient angularhow to read json file in angular 7 using httpuse httpclient to load local json file angularangular http json file objectsimporting json file content into angular with httpclientangular httpclient load json filego through json file in angular in httpangular how to use json file with http get on prodangular use httpclient get to get a json file on prodread local json file using angular httpclientget json file without httpclient angularread data from json file in angular using httpecrire data in json file angular using httpclientcall api from json file angulargo through json file in angular 8 in httphow to access json file using httpclient in angularangualr use httpclient get to get a json fileangular load json file with httpclient