Questions tagged [angular2-ngmodel]

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

200 questions
0
votes
1 answer

Unable to implement two way binding for drop down which is under JQuery form

I have [(ngModel)] and (ngModelChange) attribute for a dropdown, but if I want to load any default value using [value] attribute my ngModel not giving the currently changed value. I need two-way of binding on a dropdown.In general just a select…
0
votes
0 answers

Can I use [(ngModel)] in a
  • or element?
  • A beginner in angular2. A documentation of ngModel in angular1 stated that it can be used with , and . Does this apply to the ngModel usage with 2 way data binding in angular2 too ? or can it be used with elements like and . What is the…
    0
    votes
    2 answers

    how to use ngModel and ngIf for filtering data

    I am new to ionic2 i need to filter the data based on what i enter , so i thought of using ngModel and ngIf. My JSON contains list of name and email and the code is below. Please tell me where I am going wrong, or if any other way please let me…
    inoxe
    • 89
    • 4
    • 11
    0
    votes
    1 answer

    All checkboxes are selected (or not) by default when loading model in Angular2

    I have a weird issue. In my html pages, I have the following code:
    javisrk
    • 573
    • 3
    • 18
    0
    votes
    2 answers

    Angular2 can't use ngModel in form repeated by ngFor

    How can I use ngModel for inputs across multiple forms that's repeated by ngFor? Angular2 gives me error when I'm trying to do so. Error: Permission denied to access property "rejection" Example block of problematic code:
    Skyvory
    • 355
    • 6
    • 15
    0
    votes
    1 answer

    how to get ngModel value which is inside of ngFor?

    Krishna Patel
    • 275
    • 4
    • 18
    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
    • 17
    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,129
    • 1
    • 10
    • 28
    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,537
    • 5
    • 11
    • 15
    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
    • 633
    • 8
    • 20
    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…
    1 2 3
    13
    14