-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from juanjotorres90/develop
Add 'fieldControlName' option to get the form control from the parent form group by name
- Loading branch information
Showing
15 changed files
with
1,120 additions
and
960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,5 @@ testem.log | |
Thumbs.db | ||
|
||
.nx/cache | ||
.nx/workspace-data | ||
.angular |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ yarn.lock | |
dist | ||
|
||
/.nx/cache | ||
|
||
/.nx/workspace-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 24 additions & 10 deletions
34
apps/ngx-material-intl-tel-input/src/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
<ngx-material-intl-tel-input | ||
(currentValue)="getValue($event)" | ||
></ngx-material-intl-tel-input> | ||
|
||
@if (currentPhoneValue()) { | ||
<div>Returned value: {{ currentPhoneValue() }}</div> | ||
} @else { | ||
<div>No value returned</div> | ||
} | ||
<router-outlet></router-outlet> | ||
<section> | ||
<form [formGroup]="formTestGroup" (ngSubmit)="onSubmit()"> | ||
<ngx-material-intl-tel-input | ||
(currentValue)="getValue($event)" | ||
fieldControlName="phone" | ||
></ngx-material-intl-tel-input> | ||
<button mat-flat-button type="submit" [disabled]="!formTestGroup.valid"> | ||
Submit | ||
</button> | ||
</form> | ||
@if (currentPhoneValue()) { | ||
<div> | ||
Returned value: <br /><mat-chip>{{ currentPhoneValue() }}</mat-chip> | ||
</div> | ||
} @else { | ||
<div>No value returned</div> | ||
} | ||
@if (submittedPhoneValue()) { | ||
<div> | ||
Submitted value: <br /><mat-chip>{{ submittedPhoneValue() }}</mat-chip> | ||
</div> | ||
} | ||
<router-outlet></router-outlet> | ||
</section> |
34 changes: 26 additions & 8 deletions
34
apps/ngx-material-intl-tel-input/src/app/app.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 32px; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
ngx-material-intl-tel-input, | ||
div { | ||
max-width: 400px; | ||
padding: 16px; | ||
box-sizing: border-box; | ||
display: block; | ||
width: 100%; | ||
section { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 8px; | ||
justify-content: center; | ||
align-items: center; | ||
form { | ||
button { | ||
display: block; | ||
margin: 0 auto; | ||
} | ||
} | ||
ngx-material-intl-tel-input, | ||
div { | ||
max-width: 400px; | ||
padding: 16px; | ||
box-sizing: border-box; | ||
display: block; | ||
width: 100%; | ||
} | ||
& > div { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 16px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.