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