Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
112 views

I am not sure what's the proper way to set up the drop drop down options. the code I have is not working. please help. this is angular 18. I have an array that is a computed signal, this is the ...
STH's user avatar
  • 123
1 vote
2 answers
41 views

I'm experienced in the use of [(ngModel)] to achieve two-way value binding between a component field and a form control in the component's template, and the use of (ngModelChange) to perform ...
Green Grasso Holm's user avatar
1 vote
1 answer
49 views

After I add an Object to the array, the values don't appear in the tableInputRow.name but the values from tableInputRow.priority work. This is the object pushed to the Array export class ...
Marian07's user avatar
  • 2,630
0 votes
1 answer
162 views

i am using angular2-query-builder library in my project. my angular cli version is 13.0.4 and "angular2-query-builder" is "^0.6.2". i added QueryBuilderModule at app.module.ts file....
chandan kumar's user avatar
0 votes
2 answers
3k views

I have trouble with unit test in Angular 2+. And now I am trying the smaller example (similar to my component) to learn how to test a input checkbox with ngmodel. But it does not run. Here my smaller ...
tres.14159's user avatar
0 votes
1 answer
114 views

I have two input fields and when I enter any number value in input field 1 (dummy1) it should update the input field 2 (dummy2). Once input field 2 is updated, it should trigger the successMessage(). ...
Muthu's user avatar
  • 938
1 vote
1 answer
2k views

I'm receiving the old and very well know error: "Can't bind to 'ngModel' since it isn't a known property of 'mat-select.'" BUT FormsModule is imported on app.module.ts. FormsModule is ...
Nisanio's user avatar
1 vote
1 answer
3k views

The ngModel is not working. I'm using it with textbox. app.component.html <input type="text" [value]="name" [ngModel]="name"> Name is: {{name}} app.component.ts ...
Billy's user avatar
  • 905
0 votes
1 answer
2k views

When I try to nest NgModelGroup inside another NgModelGroup, it looks like Angular just ignore it. I'm using Angular 12 and Template-driven Forms. This is how my code looks like: app.component.html &...
Pankwood's user avatar
  • 1,876
0 votes
2 answers
245 views

In the following code snippets you the filter functions doesn't work. Component HTML: <div class="products-page"> <div class="grid"> <div class="col-3"&...
ser911's user avatar
  • 1
1 vote
2 answers
10k views

I am running into some issues with trying to use FormBuilder in my Angular app and how I can set the default values in the form based on my ngModel data. In my class, I have the following code: form: ...
zeropsi's user avatar
  • 724
0 votes
1 answer
1k views

I have imported forms module. Also I have included in imports section still I am getting error. It is highlighting error in html files only. I am not able to understand the issue. <textarea rows=&...
Shruti sharma's user avatar
0 votes
1 answer
9k views

So I'm trying to add a simple validation message. App.Module.ts import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @NgModule({ ... imports: [ FormsModule, ReactiveFormsModule, ] }) ...
Jeb50's user avatar
  • 7,137
1 vote
0 answers
286 views

I am trying to get the Angular form validation, i.e. ng-touched, ng-valid, etc. working on a input element without an ngModel binding. There are three radio buttons: a, b and ab, which I need to map ...
Laurin's user avatar
  • 125
0 votes
1 answer
2k views

I'm sure I must be missing something terribly simple but I've been thrashing about with this for a full day now... I have a MatDialog with one text input. Upon closing the dialog this value needs to ...
Ego Placebo's user avatar
0 votes
1 answer
1k views

Two way binding in angular 9 form I tried using [(ngmodel)] in form but it gives error This is depricated in angular 6 and above versions
anony's user avatar
  • 1
3 votes
1 answer
2k views

I have two input field ("name" and "city") and one textarea on my screen. Text area is filled up with some JSON data and data contains a few details like "name", "...
Kanchan's user avatar
  • 1,627
0 votes
3 answers
273 views

I've a Angular application which displays company & contact person information on a text box as below Company Email address: <label> Company Email address</label> <input type=&...
HARI PRASAD's user avatar
2 votes
0 answers
202 views

I created a custom directive for telephone number mask (eg: 123-234-4566). My input box have minlength and maxlength 12. If I copy paste a 10 digit number in the element, The directive updated the ...
balaG's user avatar
  • 461
2 votes
2 answers
1k views

My question is referring to all Angular versions >= 2 So for two-way data binding, does Angular support it out of the box using ngModel. Is it only supported for form controls e.g. input box ? Is ...
copenndthagen's user avatar
4 votes
1 answer
2k views

I have a JSON with structure: For item "item": { "pk": "123456", "title": "Title4", "list_fields": [ { ...
s_spirit's user avatar
  • 125
1 vote
1 answer
392 views

I tried to start a new project on angular 10 today, but i got this problem whenever a try to use a ngModel inside of anything, and i know that question was already asked and resolved several times ...
OLendari0's user avatar
1 vote
2 answers
1k views

I've been stuck on something for hours and I need some help. I'm pretty new to angular. I'm working with the reactive forms, showing my code and explaining what I want to accomplish. <mat-form-...
bloqqq's user avatar
  • 13
0 votes
1 answer
370 views

I have a form which has an input. I applied two-way event binding on the input, however, it doesn't work. I have imported the FormsModule in my AppModule and I am not getting any errors. search....
Mohammed Shoaib's user avatar
0 votes
2 answers
53 views

I have a list of types in my component.ts as followed. public type: string; types:Array<Object> = [ {name: "Category", value: "c"}, {name: "Cuisine",...
Shiladitya Bose's user avatar
-1 votes
1 answer
320 views

Angular NgModel Does Not Work At All: Object(...) is not a function Even just having ngModel on an input was crushing my runtime. Did I remember to import the FormsModule? Yes. Having #form="...
Cody's user avatar
  • 10.1k
0 votes
0 answers
451 views

Good day Community, I have a problem with binding interpolated data/value with [ngModel], I would like to send the interpolated data to my database so i can get it and use it, but its sending and ...
Chris's user avatar
  • 5
0 votes
2 answers
1k views

I have one directive which reads the dirty state of the input control and takes some action. Following is the code of the directive. // our root app component import { Directive, HostListener, Input } ...
Manish Kumar's user avatar
  • 1,176
0 votes
1 answer
310 views

I would like to know how I can manipulate an input that has as ngModel an attribute that comes from an ngFor, and change its value in the component, next I show my code HTML FRONT the idea is that ...
Marcelo Díaz Sanzana's user avatar
0 votes
1 answer
81 views

I am trying to organize a drop down list that will display a single value to the user but will also pass back an array object upon changing the selection. Currently I have an array called ...
user68288's user avatar
  • 784
0 votes
1 answer
1k views

Consider a simple crud scenario. I have a lot of input fields and buttons in app.component.html. When i press a button from app.component.html, it will send html field value to 'other.component.ts' ...
user avatar
0 votes
2 answers
3k views

In my application I would like to change 3 values with one ngModelChange. My component looks like: model: any = {}; images: any; public input = true; public dropdown = false; images : ...
Arzu Suleymanov's user avatar
4 votes
1 answer
11k views

This is simple custom form control @Component({ selector: 'app-custom-control', template: ` {{ value }} <input [ngModel]="value" (ngModelChange)="onChange($event)"> `, providers:...
user avatar
3 votes
3 answers
5k views

How can I prevent NgModel from setting invalid template-driven form control values? I verified that NgModel will set invalid values when two-way bound to a model instance. I am aware that I can create ...
Trevor Karjanis's user avatar
3 votes
5 answers
19k views

I have a very basic select-option input control in Angular 8. User selects one item from dropdown and it's reflected correctly in dropdown as well as in ngModel variable. But if I empty the source ...
user296526's user avatar
0 votes
3 answers
11k views

I have a project that has a select of several questions and I would like the first one to appear by default. I have seen an example of how to achieve this using the index, of the type: <select>...
Ulises 2010's user avatar
1 vote
1 answer
614 views

I have the following html inside a ngForm: <div class="form-group form-group-flex" *ngFor="let customerRole of customerRoles; let i = index"> <div class="role-name"> <label ...
M.Dietz's user avatar
  • 1,020
0 votes
0 answers
36 views

that's my html code ...
belkawini's user avatar
4 votes
1 answer
3k views

I have an input field with two way binding and I want to change the user input to uppercase and limit it to 3 characters. I'm doing this in the setter of the variable. The uppercase replacement works ...
Milhooz's user avatar
  • 43
1 vote
2 answers
3k views

I am using Angular 6 and Html. I want to sum or total a nested array field and show in row. I have a array list ('marksEntryList') with multiple student and also have a nested array list ('...
Monir Tuhin's user avatar
1 vote
2 answers
608 views

I have an Angular 8 app. app.component.html <div> <label class="form-check-label f-14"> <input type="checkbox" class="form-check-input" name="isAgree" [(ngModel)]="...
Kgn-web's user avatar
  • 7,645
0 votes
0 answers
2k views

I'm using ngx-chips for a tag input control. I'm using my own custom objects as items to use in the control's dropdown; these have this structure: _id: number; name: string; summary: string; ...
IvanS95's user avatar
  • 5,802
1 vote
2 answers
4k views

I have built this form: Here's the html code: <table class="table table-hover table-bordered table-striped table-highlight"> <thead> <tr> <th *ngFor="let cell of ...
AG_HIHI's user avatar
  • 2,065
1 vote
1 answer
2k views

I have a custom Component for radio buttons using: NG_VALUE_ACCESSOR I embed the radio-buttons in a parent component and try to pass the ngModel and required attribute to it, but It doesn't work. ...
k.vincent's user avatar
  • 4,243
0 votes
1 answer
158 views

I have a <select> tag with options that are of two different type of objects. I want the [(ngModel)] to be binded to the same Object but to different properties of that object. For example [(...
user3261212's user avatar
1 vote
4 answers
15k views

I have an input text box which use ngModel bind to a variable inside the component class. Upon clicking a button I want to clear the input text, however changing the variable value doesn't change the ...
user3794740's user avatar
0 votes
5 answers
1k views

I have a reactive form where the submit button should be disabled until aa inputs are filled I have tried using ngmodel and ngForm parameters to disable the button but it is not enabled when the ...
Danny's user avatar
  • 21
0 votes
1 answer
479 views

I there a way to create the "ngModel" parameter in template driven forms as a dynamic name (for ex. by loop)? I wish to get something like: <div *ngFor='let d of items; let i = index;'> &...
Nat's user avatar
  • 43
2 votes
2 answers
1k views

I have a quite complex object which should be the model for a component. It might look something like this: { "attribute1": "value1", "attribute2": "value2", "attribute3": "value3", "...
Draco's user avatar
  • 73
-1 votes
1 answer
346 views

How to create element with dynamic name in ngModel? <div class="form-group" *ngFor="let setting of settings"> <label [for]="setting.name + '-' + setting.type">Setting</label> ...
tmoha's user avatar
  • 1

1
2 3 4 5