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