Moving strings to template.

This commit is contained in:
softsimon 2020-03-01 23:18:03 +07:00
parent 2382aa44e1
commit 02373f366c
2 changed files with 2 additions and 5 deletions

View File

@ -1,10 +1,10 @@
<form [formGroup]="searchForm" (submit)="searchForm.valid && search()" class="mr-4" novalidate>
<div class="form-row">
<div style="width: 350px;" class="mr-2">
<input formControlName="searchText" type="text" class="form-control" [placeholder]="searchBoxPlaceholderText">
<input formControlName="searchText" type="text" class="form-control" placeholder="Transaction, address, block hash...">
</div>
<div>
<button type="submit" class="btn btn-block btn-primary">{{ searchButtonText }}</button>
<button type="submit" class="btn btn-block btn-primary">Search</button>
</div>
</div>
</form>

View File

@ -11,9 +11,6 @@ import { Router } from '@angular/router';
export class SearchFormComponent implements OnInit {
searchForm: FormGroup;
searchButtonText = 'Search';
searchBoxPlaceholderText = 'Transaction, address, block hash...';
regexAddress = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,87})$/;
regexBlockhash = /^[0]{8}[a-fA-F0-9]{56}$/;
regexTransaction = /^[a-fA-F0-9]{64}$/;