[frontend] Add provider for BASE_URL
This commit is contained in:
parent
c928532c44
commit
5b1bbfa24e
|
@ -12,6 +12,8 @@ import { HoodpageComponent } from './hoodpage/hoodpage.component';
|
||||||
import { HoodspageComponent } from './hoodspage/hoodspage.component';
|
import { HoodspageComponent } from './hoodspage/hoodspage.component';
|
||||||
import { ApiModule } from './api/api.module';
|
import { ApiModule } from './api/api.module';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
import { BASE_PATH } from './api/variables';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -30,7 +32,7 @@ import { HttpClientModule } from '@angular/common/http';
|
||||||
ApiModule,
|
ApiModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],
|
||||||
bootstrap: [AppComponent],
|
bootstrap: [AppComponent],
|
||||||
})
|
})
|
||||||
export class AppModule {}
|
export class AppModule {}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
backendUrl: 'http://localhost:8000/api',
|
API_BASE_PATH: 'http://localhost:8000',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue