refactor: use other way to save env
This commit is contained in:
parent
aca3eb457a
commit
c91973b185
@ -49,7 +49,13 @@
|
|||||||
"development": {
|
"development": {
|
||||||
"optimization": false,
|
"optimization": false,
|
||||||
"extractLicenses": false,
|
"extractLicenses": false,
|
||||||
"sourceMap": true
|
"sourceMap": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.development.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "production"
|
"defaultConfiguration": "production"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {catchError, mergeMap, Observable, retryWhen, timer} from "rxjs";
|
import {catchError, mergeMap, Observable, retryWhen, timer} from "rxjs";
|
||||||
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
|
import {HttpClient, HttpErrorResponse} from "@angular/common/http";
|
||||||
import {NotifyColor, OpenNotifyService} from "@service/open-notify.service";
|
import {NotifyColor, OpenNotifyService} from "@service/open-notify.service";
|
||||||
import {environment} from "@/config/environment";
|
import {environment} from "@environment";
|
||||||
import {Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
import {Injectable} from "@angular/core";
|
import {Injectable} from "@angular/core";
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
apiUrl: 'http://localhost:5269/api/',
|
apiUrl: 'http://localhost:5269/api/',
|
||||||
production: false,
|
maxRetry: 5,
|
||||||
maxRetry: 3,
|
|
||||||
retryDelay: 1500
|
retryDelay: 1500
|
||||||
}
|
};
|
5
src/environments/environment.ts
Normal file
5
src/environments/environment.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export const environment = {
|
||||||
|
apiUrl: '',
|
||||||
|
maxRetry: 3,
|
||||||
|
retryDelay: 1500
|
||||||
|
};
|
@ -6,7 +6,7 @@ import {MatInput} from "@angular/material/input";
|
|||||||
import {AsyncPipe} from "@angular/common";
|
import {AsyncPipe} from "@angular/common";
|
||||||
import {FormControl, ReactiveFormsModule, Validators} from "@angular/forms";
|
import {FormControl, ReactiveFormsModule, Validators} from "@angular/forms";
|
||||||
import SetupService from "@api/v1/setup.service";
|
import SetupService from "@api/v1/setup.service";
|
||||||
import {environment} from "@/config/environment";
|
import {environment} from "@environment";
|
||||||
import {AvailableVersion} from "@api/api.service";
|
import {AvailableVersion} from "@api/api.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
"./src/shared/requests/*",
|
"./src/shared/requests/*",
|
||||||
"./src/api/*"
|
"./src/api/*"
|
||||||
],
|
],
|
||||||
|
"@environment": ["./src/environments/environment.ts"],
|
||||||
"@/*": [
|
"@/*": [
|
||||||
"./src/*"
|
"./src/*"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user