Skip to main content

Questions tagged [angular4-forms]

Questions related to Angular 4 template or reactive forms.

angular4-forms
1 vote
0 answers
105 views

How to make chekbox required only if one of them is selected with FormGroup

I have some problem with custom validation in Angular 4 using FormGroup and FormControl. I have page with multiple checkboxes, in this example 6 of them. Three of them are required all time, and ...
Suule's user avatar
  • 2,398
0 votes
1 answer
10k views

NgClass Error Angular (Can't bind to 'ngClass' since it isn't a known property of 'a')

I'm new to angular, and I'm trying to dynamically add a bootstrap class to my html, based on the active tab, however, I'm getting an error. Can you help me? My error: Can't bind to 'ngClass' since it ...
Dave's user avatar
  • 91
0 votes
0 answers
88 views

Getting reactive form values in Angular 4

I am using reactive form in my Ionic project. I have multiple slides and each slide has a form. When i'm trying to retrieve the value I'm getting the value from the first slide. Stackblitz link for ...
daemon's user avatar
  • 123
0 votes
1 answer
848 views

Angular 4 - Reactive Forms - Blurring one field highlights all fields as red

For context, this is my form: this.commentForm = this.fb.group( { commentId: [''], commentType: ['', ExistsWithinList(this.commentTypes)], commodity: ['', ...
Wassim Katbey's user avatar
0 votes
1 answer
363 views

Angular 4 search box with duplicate text

Angular 4 serach box issue How to stop the value in second search box text when we enter value in one text box. we have multiple searchbox for each of the item in my page.when we type any text in one ...
user1877936's user avatar
2 votes
0 answers
504 views

Angular Material form shows as ng-valid when required fields show as ng-invalid

I'm working on a form in Angular4 with some pretty basic validation, just a few fields which I want to ensure are filled in before the user can hit "submit." Using the "required" attribute along with ...
JonWash's user avatar
  • 21
0 votes
0 answers
48 views

Reset the drop down values in angular4 with customized fields

While migrating old angular app to angular 4 I came across this in .js file customized dropdown hps-dropdown model="studentRequest.CountryType" reset-id="countryResetId" is-required="false" options=...
user1877936's user avatar
0 votes
3 answers
4k views

How to disable the input text based on *ngif in angular4

how to disable textbox if the ngifcondition satisfies on text box field. Below didnt work for me <input [ngClass]="{'disbaled' : !isprecheck}" type="text" class="form-control" id="title" name="...
user1877936's user avatar
0 votes
0 answers
197 views

How validate FormArray control in Angular 6

My HTML looks like this - <form name="add_stepform" [formGroup]="ActionTypeForm" novalidate> <cdk-virtual-scroll-viewport [itemSize]="100" class="stepViewPort"> <div [@...
Priyanka 's user avatar
0 votes
2 answers
3k views

how to remove authorization Bearer in angular 4 post API call

Need to remove Authorization Bearer in POST Call Below code didnt remove the authorization bearer which is coming from http interceptors. Status code: 403 Unauthorized RequestAuthorization header is ...
user1877936's user avatar
0 votes
1 answer
722 views

what is the $location.search() in angular 4

how to use the $location.search in angular 4 var queryParams = $location.search(); -- in angular setDefaultLanguage() { var queryParams = $location.search(); if (queryParams.locale) { ...
user1877936's user avatar
0 votes
1 answer
1k views

How to post the Form data using template driven forms using angular 4

I want to post the request payload data on submit the form fields as post API: Facing issue with the 400 bad request. How to pass the request payload with the form details? component.html <form #...
user1877936's user avatar
1 vote
1 answer
44 views

How to pass locale in get service call using angular4

Need to find the locale and pass the same to service(get) call : Property 'indexOf' does not exist on type '() => string[]' Heading in angular4. //Call Languages getshortLanguages() { ...
user1877936's user avatar
0 votes
0 answers
91 views

Custom Validator in Angular4 with dynamic parameter

In the form password field is there which has a specific pattern(small alphabet, capital alphabet, special, length) components.ts Initialize a boolean array for keeping track of pattern which is ...
Striker's user avatar
  • 61
0 votes
0 answers
63 views

Called Api Once and used many component in Angular 4?

I have two component Master and MasterDetails and one service name MasterService when first time load master component its working fine but if I navigate to MasterDetails component then I get blank ...
Shubham Sali's user avatar

15 30 50 per page
1
2 3 4 5
41