-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
When Coding Test website (./web) is executed a blank page is shown.
This is due to the Proxy Config pointing the wrong URL and Data Services Festivals urls containing incorrect path. To resolve;
/web/proxy.conf.js should read:-
const PROXY_CONFIG = {
'/codingtest/*': {
'target': `https://eacp.energyaustralia.com.au/`,
'secure': true,
'changeOrigin': true,
'logLevel': 'debug',
},
};
module.exports = PROXY_CONFIG;
and /web/src/app/core/data-services/festival-data.service.ts should read:-
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { Festival } from '../models/festival.model';
@Injectable({ providedIn: 'root' })
export class FestivalDataService {
private urls = {
festivals: '/codingtest/api/v1/festivals',
};
constructor(private http: HttpClient) { }
public getFestivalsData(): Observable<Array<Festival>> {
return this.http.get<Array<Festival>>(`${this.urls.festivals}`);
}
}
Metadata
Metadata
Assignees
Labels
No labels