Repository navigation
Expand file tree
/
Copy pathcontact.component.html
More file actions
57 lines (52 loc) · 2.45 KB
/
Copy pathcontact.component.html
File metadata and controls
57 lines (52 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="space-around center" >
<form #f="ngForm" class="example-form" [formGroup]="formContact" (ngSubmit)="OnSubmit(f.value)" fxFlex="95">
<mat-form-field class="example-full-width">
<input matInput placeholder="Name" [formControl]="formContact.controls['name']" [errorStateMatcher]="matcher">
<!-- <mat-hint>Errors appear instantly!</mat-hint> -->
<mat-error *ngIf="formContact.hasError('required',['name'])">
Name is
<strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="example-full-width">
<input matInput placeholder="Email" [formControl]="formContact.controls['email']" [errorStateMatcher]="matcher">
<!-- <mat-hint>Errors appear instantly!</mat-hint> -->
<mat-error *ngIf="formContact.hasError('email',['email']) && !formContact.hasError('required',['email'])">
Please enter a valid email address
</mat-error>
<mat-error *ngIf="formContact.hasError('required',['email'])">
Name is
<strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="example-full-width">
<input matInput placeholder="Subject" [formControl]="formContact.controls['subject']" [errorStateMatcher]="matcher">
<!-- <mat-hint>Errors appear instantly!</mat-hint> -->
<mat-error *ngIf="formContact.hasError('required',['subject'])">
Subject is
<strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field class="example-full-width">
<textarea matInput placeholder="Message" [formControl]="formContact.controls['message']" [errorStateMatcher]="matcher"></textarea>
<!-- <mat-hint>Errors appear instantly!</mat-hint> -->
<mat-error *ngIf="formContact.hasError('required',['message'])">
Message is
<strong>required</strong>
</mat-error>
</mat-form-field>
<!-- <mat-form-field class="example-full-width">
<input matInput placeholder="Email" [formControl]="emailFormControl"
[errorStateMatcher]="matcher">
<mat-hint>Errors appear instantly!</mat-hint>
<mat-error *ngIf="emailFormControl.hasError('email') && !emailFormControl.hasError('required')">
Please enter a valid email address
</mat-error>
<mat-error *ngIf="emailFormControl.hasError('required')">
Email is <strong>required</strong>
</mat-error>
</mat-form-field> -->
<button mat-raised-button color="primary">Enviar</button>
<!-- <md-button>sss</md-button> -->
</form>
</div>