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