Used in Angular.js - The ngModel directive binds an input, select, textarea (or custom form control) to a property on the scope using NgModelController, which is created and exposed by this directive.

learn more… | top users | synonyms

2
votes
0answers
26 views

What scenarios force me to setup workarounds for ng-model in angular?

Typically in almost all situations, I am able to setup ng-model on an element in the standard fashion as follows. <textarea ng-model="MessageText"></textarea> But sometimes ng-model ...
2
votes
0answers
355 views

Access HTML form input value if ng-model is invalid

Suppose I have form with one input and validation rules like min-length, max-length, etc. I want to show hint to user how much symbols he should append to (or remove from) current input value to pass ...
1
vote
0answers
29 views

Updating or Resetting ng-model binding to new attribute

I have updated the binding for the ng-model to a new attribute in the scope. I have to compile the template to update the angular bindings. directive('reset', function($compile) { return { ...
1
vote
0answers
21 views

Browser-sync doesn't update the ng-model correctly

I have some problem using browser-sync with angular js, here's my question. I successfully sync the click and scroll events with browser-sync, but not the input fields. Although the "text" in the ...
1
vote
0answers
35 views

Why is ngModelController.$validators undefined?

This doesn't make much sense since the directive with the error in question is working just fine on another page I'm running. The error TypeError: Cannot set property 'qtMatch' of undefined The ...
1
vote
0answers
55 views

How to bind value from nested json to ng-model dynamically in angularjs

I'm currently working on angularjs project and since I'm a fresher, I have doubt on ng-model directive ... I need to know how to dynamically bind value from nested json to ng-model in the html page ...
1
vote
0answers
33 views

How to set ngModel in ngRepeat value (AngularJS)

On the code you can see as follows: <div class="form-group form-group-sm" ng-repeat="sForm in sForms"> <label class="col-sm-3 control-label">{{sForm.label}}</label> <div ...
1
vote
0answers
47 views

Angular ng-model not updating when setting text on input

I'm having a bit of trouble with angular was hoping you could lend me a hand. I have this HTML code: </head> <body ng-app="starter" ng-controller="editarCtrl"> <ion-pane> ...
1
vote
0answers
15 views

ng-selected value is not correctly passed to ng-model

<select name="taskBoard" id="" ng-model="newTask.taskBoard"> <option value="{{board}}" ng-repeat="board in boards track by $index" ...
1
vote
0answers
22 views

What is the complete list of events supported by angular's updateOn property of ngModelOptions?

The docs say updateOn: string specifying which event should the input be bound to. You can set several events using an space delimited list. There is a special event called default that matches ...
1
vote
0answers
26 views

angular - ngModelController $formatters won't trigger.

Hey guys i'm having trouble wrapping my head around the ngModelController. i have this directive: app.directive('emailValidation', function () { return { restrict: 'A', require: 'ngModel', ...
1
vote
0answers
44 views

AngularJS ng-bind issue

I am working on angular application. I need to bind two model variable using ng-bind and two variables from two different scope (One from parent and other from child scope). Is that possible? Here is ...
1
vote
0answers
96 views

How to deploy angularjs project in production without using npm start

I am developing a website using angularjs and am using npm to host a local development server. I copied my project directory into a public AFS directory and can access the index.html page fine but ...
1
vote
0answers
141 views

ng-model on <input type='number'> dosen't allow to have characters. AngularJS, ionic

I have a input which needs to trigger number keypad on a android device.As per my understanding, type='number' will do that for me. But I need to show a mask in the place of user's input after one ...
1
vote
0answers
145 views

ngModel doesn't change the original variable when in a custom directive with ngInclude

The variable inside the directive changes but outside the directive it doesn't change. Here is the actual code: main.html <div class="row" ng-repeat="row in template"> <fx-widget ...
1
vote
0answers
262 views

Having trouble integrating Fuel UX with AngularJS

I have been able to successfully integrate the spinbox with AngularJS using the ng-model on the element. However, I cannot get this to work with selectlist. I have tried using the exact sample ...
1
vote
0answers
262 views

Angularjs directive input binding with bootstrap popover

So I am trying to make a directive that is encapsulated inside a Bootstrap popover. Almost everything is working - I have event listeners to know when buttons get clicked, links, everything is ...
1
vote
0answers
146 views

Model in from ng-option not displaying results | Possible dynamic model?

I currently list a set of options for ng-options from a resource that contains JSON. [ { id:23, name:"Other" }, { id:24, name:"Crew" }, { id:25, ...
1
vote
0answers
216 views

Angular JS model is not updated immediately using Bootstrap popup

I am using ng-repeat for iterating through a list of objects, and for each item in the list there are child objects which are edited in a Bootstrap modal popup. I am unable to use the Angular modal ...
1
vote
0answers
216 views

AngularJS: Commit/Rollback model based on $resource

I'm trying to find a generic solution to commit/rollback a model alongside ng-resource. When to commit/save model: Successful http write methods (PUT, POST, PATCH). When to rollback/reset model: ...
1
vote
0answers
264 views

value changed in ng-model in templatedUrl is undefined in directive

initially when i load it works fine but when i change the value in template URl for ng-model scope.value is undefined inside my link. i am making directive for datepicker bootstrap angularjs. ...
1
vote
0answers
614 views

AngularJS - ngrepeat form input elements dynamically filled with default values to post

http://jsfiddle.net/9sCnC/12/# I'm going through a json file and parsing it through ng-repeat, a button on each item opening a modal window. In this window a form is generated with data I would like ...
0
votes
0answers
10 views

Angular Input Restriction Directive - Negate Regex ngModel $parse

I'm trying to create an Angular Directive that limits the characters input into a text box. I've been successful with a couple common use cases (alphbetical, alphanumeric and numeric) but using ...
0
votes
0answers
10 views

Once prevent submission to a form, the scope property is being initialize

I'm using ng-models to bind $scope.campaign {Campaign} properties to the inputs of a form. If I check the campaign properties before, they all updates to the input the user inserting. Once the ...
0
votes
0answers
26 views

Why using angular directive for select, the first option change is an empty option with “?” as value?

At the beginning, when the selection is loaded, it's fine, but when I changed the option it shows me as option selected an empty select, then it works fine HTML: <select name="questionId1" ...
0
votes
0answers
7 views

angular gm-places-autocomplete TypeError: Converting circular structure to JSON

hello, I recovered in a map an input angular autocomplete . But I have this back Error: [$interpolate:interr] Can't interpolate: {{ formData }} TypeError: Converting circular structure to JSON ...
0
votes
0answers
16 views

Angularjs unable to update data given [422 (Unprocessable Entity)]

I am trying to update my database using ngresource method PUT But unable to that because it's an object what's bothering it. Lets take a look I Have my service like this . PlateInspection ...
0
votes
0answers
23 views

ng-model dynamic object structure

I've got this jade snipped: form#filters ul.filters li(ng-repeat='filter in filtersScaffold') .checkbox.checkbox-inline.c-checkbox input(id='{{filter.attribute_id}}', ...
0
votes
0answers
20 views

AngularJS: Select (ng-options) ng-model does not update anymore after the first interaction

I have this weird behavior I can't find a way to fix: I can change and update the model of a select (and so the selected option, that's my goal) through the controller or from other events (button ...
0
votes
0answers
17 views

ng-model not reflecting value selected through typeahead input

I am trying to bind the value selected using typeahead to a scope variable. I would like to read its value through the variable and may be reset it conditionally too. But I am not able to get it ...
0
votes
0answers
35 views

How to hide field and use ng-model for Rest Service?

I have field that i want to hide permanently from the view but i want to use ng-model for Rest Service to do some calculation for other fields. How to achieve that task using AngularJS ? So far tried ...
0
votes
0answers
29 views

Change ng-bind and ng-model dynamically

i need help. I have a project and i need duplicate html nodes dynamically. Those nodes have ng-bind and ng-model attributes like this: <input class="quest_model" type="text" ...
0
votes
0answers
33 views

Angularjs - How to use different ngModelOptions based on the ngModel's validity

I'm currently using ng-model-options="{ updateOn: 'default blur', debounce: { default: 500, blur: 0 } }" in order to try to avoid showing errors to my users while they're in the middle of filling out ...
0
votes
0answers
75 views

Dynamically change input field values using angularJS and save the value to the database

Hi my project is running on Django framework and some use of angularJS. I have some input fields in my html page, the input fields/radio buttons is getting increased once the user clicks on the add ...
0
votes
0answers
25 views

AngularJS: Filtering through a table with multiple keywords

I have a problem with filtering with a search bar. Currently the filter that is in place functions but it has unwanted functionality. Because it is filtering through a JSON it will display table ...
0
votes
0answers
21 views

Override $viewValue without validators and parsers

I have an input where I type in a number formatted as currency. I found I can override the view value so that I can, for example, replace a comma with a decimal point while typing using parser: var ...
0
votes
0answers
69 views

Directive with ng-repeat and ngmodel

I created a directive to mount forms the app, do ngrepeat to get the information from the fields and set the template. The problem is when I try to record the ngmodel the resource, I do not know how ...
0
votes
0answers
47 views

Angular: Set value of text input without creating a model

I have a form that lives inside an ng-repeat. I'm not using ng-model on the form because I don't think there is a need just yet (it's not an AJAX form). I want to set the default value of one of my ...
0
votes
0answers
38 views

Issue dynamically creating inputs with angular attributes in an ng-repeat loop?

I'm trying to create a directive which takes some JSON data, and creates a form. Each of the inputs in the form are contained in a <div> wrapper. The wrapper also contains a <div> that ...
0
votes
0answers
18 views

Using ng-model with template prepended after linking to directive template

I have a dom structure where on save(), i have to capture the values of the <input> tags. This works fine as long as i have the <input> defined within template of the directive. template: ...
0
votes
0answers
58 views

get ng-model $resource in controller

I need to set the ng-model via controller by selecting one of the listed images in Dialog and insert the ng-model of the form to record it in json-server. My resource is provide by json-server. Is ...
0
votes
0answers
33 views

nGModelController.$render not called even after setting value through $setViewValue

I recently learned of the ngModelController, and had been experimenting with it. My directive is an input field and on its keydown, I set the value of the model as ngModelController.$setViewValue. It ...
0
votes
0answers
38 views

Creating Value Objects in ngModelController parsers?

Background AngularJS' ngModelController includes the ability to register: Parsers: transform the raw form field values before they are passed to the validation chain. Validators: pass/fail ...
0
votes
0answers
47 views

How can I pass date value to WebAPI from Angular Client?

I'm using a dynamic value to pass data from database. I'm not sure how to pass the value from the client to the server to get the expected data result. Here the WebAPI Ctrl: [HttpGet] public ...
0
votes
0answers
106 views

Filtering datatype date with Datepicker directive in AngularJS

I'm using datepicker directive by from UI Bootstrap. I want to return all data from SQL Server DB when I'm choosing a date from the datepicker button. How I have to do to pass to get the data from a ...
0
votes
0answers
42 views

Angular Data Binding not working when I run app on server

I'm building an application on the mean stack using mean.js and I'm having trouble with data binding when I move from my development environment to a production server. My user signup form looks ...
0
votes
0answers
36 views

AngularJS model value interpolation

I'm looking to have a model value change gradually once I set it, For example: When I set the value at $scope.data.value = 0; to $scope.data.value = 100 or perhaps have a method call, I'd like to ...
0
votes
0answers
35 views

ngModel passed through wrapper to child directive

Let's imagine, we have one child directive <child/>, that takes ng-model and ng-change and does some actions with them. And we have two kind of wrappers <w1/> and <w2/>, that contain ...
0
votes
0answers
243 views

Spring MVC-Angularjs : How do I bind object property

I dont understand why I am getting this error when i try sumbit my form ,so I have an Invalid property ‘siteesTypeSite[idTypeSite]’ of bean class in my web application ,I have tried to find the ...
0
votes
0answers
40 views

Why do we have to initialize ng-model in controller

I am new to angular but I realized that in order to use an ng-model I should initialize it in controller. For example, in index.html I have: <input type="text" name="source" ng-model="source"> ...