Questions tagged [ngmodel]

Use ngmodel for questions related to the ng-model AngularJS directive.

The ngmodel directive is used for two-way data binding of form controls. It has a built-in controller named NgModelController which exposes and API which can be used for handling state changes and performing validation.

References

386 questions
0
votes
1 answer

In Angular, how to make a custom component have [(ngModel)] with a simple flag applied to it?

In Angular, how to make a custom component whose template is a simple have [(ngModel)] applied to it? I want this [(ngModel)] to be a simple boolean flag. This ngModel will then be changed upon clicking on the div. What is the minimum code to be…
Vladimir Despotovic
  • 3,200
  • 2
  • 30
  • 58
0
votes
1 answer

Angular 6 [(ngModel)] in view not changing variable in component

I have a ClientModule module separate from the main AppModule. import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ClientsRoutingModule } from './clients-routing.module'; import { ClientsListComponent…
PPrasai
  • 1,186
  • 13
  • 36
0
votes
3 answers

ng-model not binding to input data within ng-repeat

Using AngularJs 1.6.7, I have created a table which pulls project details from a database and displays these details within a table. Each row has a modify/update button using ng-show/hide. When modify is clicked, the div changes to editable input…
0
votes
1 answer

Dynamic ngModel inside ngFor not working

I've view page like below
Manu Mohan
  • 1,694
  • 2
  • 20
  • 31
0
votes
1 answer

Angular update ng-model without quotations marks

Here is my code : JS: $scope.gamma = { 0 : 2 }; $scope.matrix = { 1 : 21, 2 : 25, 3 : 21, 4 : 85, 5 : 798, 6 : 4, 7 : 51, 8 : 224, 9 : 63 }; $scope.update_layers = function(gamma, gvalue, matrix, mvalue){ …
bafix2203
  • 541
  • 7
  • 25
0
votes
1 answer

ngModel and ngFor with Map in Angular

I'm trying to use a string boolean map with ngfor to create a list of checkboxes, but this approach doesn't work. .ts plainMap: Map = new Map(); .html
sander
  • 1,426
  • 4
  • 19
  • 46
0
votes
1 answer

I am getting error in binding ngModel in input

While binding ngModel to the input I am finding the following error - Can't bind to 'ngModel' since it isn't a known property of 'input'. ("
Select :
Anurag Ranjan
  • 242
  • 1
  • 4
  • 14
0
votes
1 answer

matDatePicker with angular cloud firestore and [(ngModel)]

With Real Time Database, I used the angular material matDatePicker to save date news. Since I have moved on with firestore collection, when I call the saved date in an angular service, it shows it as an object "date": { "seconds":…
C. Banzet
  • 409
  • 2
  • 5
  • 19
0
votes
3 answers

Angular 5 ngModel doesn't update value

I have the following component: export class ModuleComponentComponent implements OnInit { dropzoneConf; fileService = environment.getFileUrl; constructor( private moduleComponentService: ModuleComponentService) { } …
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
0
votes
1 answer

Form data passing as null except for the data updated inputs in angular 4

I have form which has 2 fields and I assigned default value to those inputs when the page loads, When I Submit the form by changing one input field, the updated input has the value in request while the other field remains null. How do I get all the…
user3326941
  • 331
  • 1
  • 4
  • 14
0
votes
1 answer

How to bind multiple options/select in Angular 4

I'll try my best to explain my scenario. I have a search filter which works when used in the following format in Angular 4: