Questions tagged [angular2-ngmodel]

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

209 questions
0
votes
1 answer

Angular 2 NgModel vs Inputs and Events

Can I use NgModel for interaction of the components or use only inputs and events? NgModel should only be used in forms?
ildarnm
  • 1
  • 1
0
votes
1 answer

Is it possible to customize Angular 2's: NgModel data flow with 2 one way data bindings?

In Angular 2, is it possible to use a ngModel as somekind of: " 2 one-way data bindings"? I'm trying to achieve an import from the users LinkedIn as suggestions that should then be posted with a form to another model. In the angular docs it is…
Anton Scotte
  • 439
  • 5
  • 19
0
votes
2 answers

angular2 rc5 using component from feature module not working

I have an app module and a feature module. A component called "AudioPlayerComponent" is declared in the feature module. I want to use it in the app module, but its not showing. No errors. Am I missing something? App Module: @NgModule({ imports:…
0
votes
1 answer

Angular2 input text value is not showing although its model contain the value

I got annoying situation with my Angular2 application, I have a table with several rows, each row contain columns with 2 way binding using [(ngModel)]. I have 2 buttons of Add and Delete and they push/splice the list of values that is used for the…
EH Sports
  • 63
  • 6
0
votes
0 answers

How to reference form's fields to add validators using NgForm, NgModel classes in angular2?

I want to add some validation to the fields of a form through Validators in Angular2: I'm binding ngForm to a form like this: #form="ngForm" For the fields i'm binding ngModel: #field="ngModel", [(ngModel)]="model.field" type="text" name="field"…
Hernan
  • 1,149
  • 1
  • 11
  • 29
0
votes
0 answers

how to bind an Array of Objects on Angular 2

I'm trying to bind an Array of Object with ([ngModel]) can anyone provide me an exemple to do that please ? i have an Array of Parameters that i want to bind it to my form here is the structure : class Parameter { label: string; …
Anna
  • 1,607
  • 5
  • 13
  • 18
0
votes
1 answer

How do I check if an ngModel is visible or not through an ngIf?

I want to be able to call this "threeMonth and complimentary" model as an object to find out if they are visible or not and display the last tag if they are not visible. Basically I want an if/elseif/else somehow

0
votes
1 answer

Angular2 Component joining multiple input components

Consider the following scenario. I want to use three NameInputComponent, which each wrap a text input, to construct a FullNamesComponent: Two NameInputComponents, for a pair of individual first names (firstName1 & firstName2) One…
bosticko
  • 763
  • 9
  • 21
0
votes
1 answer

How to select/init first value in html select option after data loads thru Angular 2 observable?

I have an html select with options that looks like this: roles[] gets assigned in a subscribe of…
0
votes
1 answer

Angular 2 ngFor and ngIf

I have a dropdown menu which contains a checkbox and the name of projects. I added an ngModel to check if the project should be included in a list of projects (isChecked). The following code is in the view:
-1
votes
1 answer

Angular NgModel Does Not Work At All: Object(...) is not a function

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="ngForm" on my
wasn't a problem. Very frustrating --…
Cody
  • 9,785
  • 4
  • 61
  • 46
-1
votes
1 answer

How to create element with dynamic name in ngModel?

How to create element with dynamic name in ngModel?
tmoha
  • 1
  • 3
-1
votes
1 answer

Is it possible to hack Angular 2 disabled input tag?

For example I have this part of code in my component's template: And in my component's module I have: if (this.currentUser.role == "Admin") { …
-1
votes
1 answer

How to get radiobutton value in angular 2?

I am working a project where i need to bind 3 radio buttons per row in table. I am binding this table but somehow its not happening. I am sharing my code what i have done. table.table thead tr th | To …
The Hungry Dictator
  • 3,444
  • 5
  • 37
  • 53
1 2 3
13
14