Questions tagged [angular2-ngmodel]

Angular 2's ngModel directive used for two-way databinding

209 questions
0
votes
0 answers

Form elements are not being correctly populated in Angular 2+ and ngModel form

I'm having trouble understanding why a "simple" ngModel form is not functioning as the resources suggests it should. The form holds a quiz with a series of multichoice (radio button) questions. When the quiz is generated, the form elements in my…
TomBaine
  • 761
  • 2
  • 11
  • 19
0
votes
0 answers

What directives and other features are available for inputs with a ControlValueAccessor?

I have a custom component. It has a ControlValueAccessor injected into it as a provider. This is the generic standard way to make custom components represent form inputs. For a more precise example the component actually implements…
Gherman
  • 6,768
  • 10
  • 48
  • 75
0
votes
2 answers

Checkbox state not reflecting ngModel value in Angular 2

So my problem is that I have a checkbox for which the state not reflects its ngModel value. Let me explain the architecture : I have a Service which manage a list of products, and a component that is supposed to display this list and let the user…
0
votes
1 answer

Angular2 ngModule split causes error

I have split my app.module.ts into multiple modules, however this is causing an error that I can't solve. I get the error: Template parse errors: 'generic-titlepagebar' is not a known element These are my modules which use…
viddrawings
  • 255
  • 1
  • 4
  • 19
0
votes
1 answer

Dynamically changing ngModel from button presses - Angular

I have this code which allows the user to filter by a certain field:
0
votes
1 answer

Nested ngFor with two-way data binding Angular2

I try to make a table of input fields with help of nested ngFor with two-way data binding. I almost achieved this, but something with two-way data binding is wrong and I can't find a problem. So, this is what I want to have - I want to be able type…
Anna F
  • 1,583
  • 4
  • 22
  • 42
0
votes
1 answer

Unable to assign variable from outer ngFor loop to ngModel inside a nested loop

The problem I'm facing is setting ngModel's variable name using a variable. To elaborate: The json being used here as 'options' is: { "a": [ "a1", "a2", "a3" ], "b": [ "b1", "b2", "b3", "b4" ], "c": [ "c1", …
0
votes
0 answers

Abstracting form-group in Angular

In brief, I want to create components of text input fields, so as to replace the commented out code that works with the component.