angular4-forms Questions

7

I used a template driven form for my login page. I want a red border on input elements if they are invalid or have any errors but the class borderRed is not being added on an input element when the...
Bustup asked 27/4, 2018 at 12:8

5

Solved

I have a custom element : <div formControlName="surveyType"> <div *ngFor="let type of surveyTypes" (click)="onSelectType(type)" [class.selected]="type === selectedType"> <md-ico...
Foreclosure asked 13/8, 2017 at 11:13

7

Solved

I have an angular 4 form where I am trying to submit data HTML Code <form class="form-horizontal" [formGroup]="signupForm" (ngSubmit)="onFormSubmit()" > <fieldset> <legend>Sc...
Melchizedek asked 1/6, 2018 at 6:9

14

Solved

I am trying to develop a contact form, I want user to enter phone number values between length 10-12. Notably same validation is working on Message field, Its only number field which is giving me ...
Abscind asked 9/9, 2017 at 10:31

5

Solved

Actually I am working with angular 4 application. I am having a scenario like, I have to send the Date for as dd/mm/yyyy to the server. I am using property as input type ="date". But this property...
Megaron asked 21/5, 2018 at 9:6

5

Solved

I'm using angular 4 forms and I have some fields. and first_name, last_name and company are really important for me. I want to force the user to fill one of these 3 fields. how can I do it? here ...
Manchineel asked 26/4, 2018 at 7:15

3

Solved

I'm building an app with component FormComponent. inside I'm using reactive forms module from angular core and create a custom validator. the function is calling another function by using this - a...
Tagliatelle asked 14/2, 2018 at 10:52

6

I have a formArray which consist of multiple form groups. I need to sort the array dynamically based on a boolean field present in each of the form group in the array. The boolean field is a chec...
Wartow asked 8/3, 2018 at 3:18

13

Solved

i want to solve this problem: Angular 5 - template driven form An input-field has type email. Example: <input type="email" [(ngModel)]="model.email" #email="ngModel" email /> I want to va...
Arlberg asked 8/3, 2018 at 21:35

5

Solved

I am using below snippet in my code. If I am applying variable binding "[(ngModel)]" then my default option i.e. "Title*" is not visible. If i remove it then it behave normally and star showing 1st...
Askance asked 14/8, 2018 at 4:31

4

I have a form to update just part of the field of an existing model class in angular 4. I need to setValue on the current model instance and at the end get the value back updated. The issue is I ...
Bulbil asked 12/4, 2018 at 13:1

7

How do I get the value from the select option in Angular 4? I want to assign it to a new variable in the component.ts file. I've tried this but outputs nothing. Can you also do it using [(ngModel...
Confrere asked 27/9, 2017 at 12:6

2

Solved

i have created a custom input control. I don't want to create any custom validation. I want to use default required, minLength, maxLength etc.I know i can do like this this.form.controls["firstNa...

3

I have an angular project in which I am using a PrimeNG checkbox component but there is an issue when I am trying to set the checkbox's default value to checked. I even tried binding [checked] prop...
Windstorm asked 21/6, 2018 at 7:48

3

Solved

I am using Angular 4 simple form,Getting error when i compile the project using command line,How to solve the warning.see Error Image 1: https://i.sstatic.net/N1AH4.png > WARNING in Circular d...
Janiuszck asked 19/12, 2017 at 7:18

1

According to the latest version of angular, the @angular/forms export the following things: export {FormControlDirective} from './directives/reactive_directives/form_control_directive'; export {For...
Instrumentality asked 14/8, 2017 at 8:31

8

there are lots of blogs already posted for this error but none is specified for angular4. I am adding and removing dynamic controls on the form add controls to the form during intialization ngOnIn...
Braxy asked 17/8, 2017 at 14:43

4

Solved

I have a service which returns a value representing the money user has, and I want the user to be able to do transactions for a value equal or less than the total amount of money. I've tried to use...
Mastersinger asked 30/8, 2017 at 5:23

4

Solved

I am using Angular 4. I want to allow the zipCode input field to only take an input of length 5 or 7 digits. HTML code: <md-input-container class="fill-width-input-wrap"> <input mdInput...
Sharpe asked 23/6, 2018 at 10:55

5

Solved

I want to fetch all checked items of a form in component without using change() or click() function as it is unable to fetch already checked items. Here is my Array in TS: PartyRoles = [ { Id:...
Lucienlucienne asked 31/8, 2017 at 7:18

3

Email validation is being fired as we keep typing in textbox. I want this validation to be fired when user focuses out of the textbox Below is my code: <input class="form-control" pattern="[a-...
Mcalpin asked 19/9, 2017 at 9:45

3

Solved

I have a reactive form created in component and some formControls defined on it. Now i need to disable one of the radio button from a radio button group based on some condition. How do i do it ...
Boote asked 20/2, 2018 at 17:8

4

Solved

I am making a reactive form in Angular 4 and looking for valueChanges in the form like below: this.searchForm.valueChanges.subscribe((value) => { console.log(value); }); The above code works...
Bornite asked 13/11, 2017 at 10:28

3

I'm trying to integrate an Invisible reCAPTCHA with my Angular 4 form. In the TS part of the component I have a function like this: onSubmit(token: string) { alert(token); } And my HTML looks ...

4

Note: I succeded doing FormArray inside classic HTML Table, as seen below . I want to have a FormArray inside Angular Material table and to populate it with data. I tried the same approach as with ...
Conglomeration asked 6/2, 2018 at 17:34

© 2022 - 2024 — McMap. All rights reserved.