Skip to content

Commit eca34b5

Browse files
author
marc101101
committed
Merge branch 'master' into feature/testing
2 parents b9e00c3 + fd64004 commit eca34b5

14 files changed

Lines changed: 160 additions & 16 deletions

angular.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
"serviceWorker": true,
4141
"ngswConfigPath": "client/ngsw-config.json",
4242
"fileReplacements": [
43+
{
44+
"replace": "client/environments/environment.ts",
45+
"with": "client/environments/environment.prod.ts"
46+
}
4347
]
4448
}
4549
}

client/app/components/home/shared/contact.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { map, catchError } from 'rxjs/operators';
33
import { Observable } from 'rxjs';
4-
import { environment } from '../../../../environments/environment.prod';
4+
import { environment } from '../../../../environments/environment';
55
import { HttpHeaders, HttpClient, HttpErrorResponse } from '@angular/common/http';
66
import { AlertService } from '../../../services/alert.service';
77
import { of } from 'rxjs';

client/app/components/home/shared/courses.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { map, catchError } from 'rxjs/operators';
33
import { Observable } from 'rxjs';
4-
import { environment } from '../../../../environments/environment.prod';
4+
import { environment } from '../../../../environments/environment';
55
import { HttpHeaders, HttpClient, HttpErrorResponse } from '@angular/common/http';
66
import { AlertService } from '../../../services/alert.service';
77
import { of } from 'rxjs';

client/app/services/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { HttpClient, HttpErrorResponse } from '../../../node_modules/@angular/common/http';
33
import { Observable } from '../../../node_modules/rxjs';
4-
import { environment } from '../../environments/environement';
4+
import { environment } from '../../environments/environment';
55
import { UserData } from '../models/UserData';
66
import { AlertService } from './alert.service';
77
import { map, catchError } from 'rxjs/operators';

client/app/services/category.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { map, catchError } from 'rxjs/operators';
33
import { Observable } from 'rxjs';
4-
import { environment } from '../../environments/environment.prod';
4+
import { environment } from '../../environments/environment';
55
import { HttpHeaders, HttpClient, HttpErrorResponse } from '@angular/common/http';
66
import { AlertService } from './alert.service';
77
import { of } from 'rxjs';

client/app/services/user.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22
import { HttpClient, HttpErrorResponse, HttpHeaders } from '../../../node_modules/@angular/common/http';
33
import { Observable } from '../../../node_modules/rxjs';
4-
import { environment } from '../../environments/environement';
4+
import { environment } from '../../environments/environment';
55
import { AlertService } from './alert.service';
66
import { map, catchError } from 'rxjs/operators';
77
import { User } from '../models/User';

client/environments/environement.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const environment = {
22
production: true,
3-
apiUrl: 'http://localhost:8080/v1'
3+
apiUrl: '/v1'
44
};
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const environment = {
22
production: false,
33
apiUrl: 'http://localhost:8080/v1'
4-
};
4+
};
5+

client/main.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
import { enableProdMode } from '@angular/core';
1+
import { enableProdMode, isDevMode } from '@angular/core';
22
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
33

44
import { AppModule } from './app/app.module';
5-
import { environment } from './environments/environment.dev';
5+
import { environment } from './environments/environment';
66

7-
if (environment.production) {
7+
/*if (environment.production) {
88
enableProdMode();
9-
}
9+
}*/
10+
11+
enableProdMode();
12+
13+
console.log(isDevMode());
1014

1115
document.addEventListener('DOMContentLoaded', () => {
1216
platformBrowserDynamic().bootstrapModule(AppModule);

0 commit comments

Comments
 (0)