remove hard code password and username
This commit is contained in:
@@ -2,5 +2,7 @@
|
|||||||
"baseUrl1": "http://192.168.8.188:5015",
|
"baseUrl1": "http://192.168.8.188:5015",
|
||||||
"baseUrl": "http://localhost:5016",
|
"baseUrl": "http://localhost:5016",
|
||||||
"baseUrl_docker": "http://localhost:8080",
|
"baseUrl_docker": "http://localhost:8080",
|
||||||
"attachment": "http://localhost/document/family"
|
"attachment": "http://localhost/document/family",
|
||||||
|
"username": "kham.vilaythong@gmail.com",
|
||||||
|
"prefill_ps": "passwor"
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|||||||
import { ButtonModule } from 'primeng/button';
|
import { ButtonModule } from 'primeng/button';
|
||||||
import { InputTextModule } from 'primeng/inputtext';
|
import { InputTextModule } from 'primeng/inputtext';
|
||||||
|
|
||||||
import { Utils } from '../shares';
|
import { AppSettingService, Utils } from '../shares';
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './login.html',
|
templateUrl: './login.html',
|
||||||
styleUrl: './login.css',
|
styleUrl: './login.css',
|
||||||
@@ -29,6 +29,7 @@ export class Login implements OnInit, OnDestroy {
|
|||||||
router = inject(Router);
|
router = inject(Router);
|
||||||
authenticationService = inject(AuthenticationService);
|
authenticationService = inject(AuthenticationService);
|
||||||
formBuilder = inject(FormBuilder);
|
formBuilder = inject(FormBuilder);
|
||||||
|
private appSetting =inject(AppSettingService);
|
||||||
loading = false;
|
loading = false;
|
||||||
homeUrl = "/person";
|
homeUrl = "/person";
|
||||||
submitted = false;
|
submitted = false;
|
||||||
@@ -40,10 +41,11 @@ export class Login implements OnInit, OnDestroy {
|
|||||||
private subscription: Subscription = new Subscription();
|
private subscription: Subscription = new Subscription();
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
const default_us = this.appSetting.appSetting.username;
|
||||||
|
const pass = this.appSetting.appSetting.prefill_ps;
|
||||||
this.loginForm = this.formBuilder.group({
|
this.loginForm = this.formBuilder.group({
|
||||||
username: ['kham.vilaythong@gmail.com', Validators.required],
|
username: [default_us, Validators.required],
|
||||||
password: ['password', Validators.required],
|
password: [pass, Validators.required],
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user