82 questions
0 votes
0 answers
47 views
Multiple validation is not working properly in template driven form
I having issue multiple validation is not working properly. For example validate1 method checking input is empty or not , validation2 method checking name1 and name2 value are equal or not equal. ...
0 votes
0 answers
23 views
How to access child component form field in parent component angular
Parent Component ts Obj1={ name:"foo" fname:"Bee"} Obj2={field1: "data", field2:"data2" , filed3:"data3"} html : <form #f="ngForm"> &...
1 vote
1 answer
61 views
Formatters and Parsers , ng-true-value & ng-false-value directive for Angular make workable
Currently I am created two directive to project . But one directive useed for if checkbox is checked , I will get 1, if checked is false i will get 0. Another Directive is used for convert value &...
1 vote
1 answer
71 views
Angular Nested Form ngModel meaning
Given the following code snippet: @Component({ selector: 'app-editor', templateUrl: './editor.component.html', styleUrls: ['./editor.component.scss'], providers: [{ provide: ...
1 vote
2 answers
75 views
Angular Template-Driven Form: Validate Password Field Only After User Interaction
I have a form: <input type="password" id="password" name="password" ngModel #password="ngModel" ...
1 vote
1 answer
46 views
Change value of dropdown from another dropdown in Angular 17
I'm trying to setup the form in such a way that when someone selects Mr in the first dropdown, the value changes to male in the second dropdown. Likewise, if someone chooses Miss/Mrs, the 2nd dropdown ...
2 votes
1 answer
52 views
select first option of dropdown on change event in angular
<select [(ngModel)]="profile.type" name="type"(change)="selectPhoneType($event,mailCreate,'phone4_Value')"> <option value="">...
0 votes
2 answers
149 views
Angular - edit textbox in grid to update row value
I'm trying to give user the ability to update the quantity of their selection before product checkout. The code below allows only 1 character in the textbox. What changes can I make to allow user ...
2 votes
1 answer
48 views
Fill Textboxes with Database Values on a Textbox Value Changed
My requirement is to fill textboxes with their corresponding value from database when a change is made in name textbox. For instance, if the value Mary is enter in name textbox then its corresponding ...
1 vote
1 answer
3k views
Angular 16 - error NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'
I have the above error message when I try to use two-way binding in a Angular application. <form> <input type="email" class="form-control" id="email" name="...
1 vote
0 answers
169 views
With Angular 16, why errors from async validators aren't displayed?
I have a weird behavior with async validators from Angular. Here's the context (this is an example, not the best use case here but that's not the issue ^^) : I have a form with a ngModelGroup inside. ...
0 votes
1 answer
331 views
Dropdown menu in template-driven form doesn't validate required property on submit
I have a template-driven form in my Angular application that includes a dropdown menu (select element). I want to validate the dropdown menu to ensure that a value is selected before the form is ...
0 votes
1 answer
582 views
How to create a Template driven formArray in Angular?
I have a fix number of checkbox which I am binding using for loop. <ul> <li *ngFor="let chk of checkboxes"> <input type="checkbox" [id]="chk.id"...
0 votes
0 answers
676 views
how to show the duplicate error message in particular row based on duplicate input using angular12
here i am using template forms for binding the values under array and there is inline edit available for each row, issue is that, if i am giving duplicate for 3 rows under order number or the name, it ...
2 votes
1 answer
159 views
Unexpected Angular ExpressionChangedAfterItHasBeenCheckedError in template-driven form
I have a very simple Angular Component as follow: import { Component } from '@angular/core'; @Component({ selector: 'test-view', template: ` <div [ngStyle]="{ 'background-color': m....