The ngModel directive in AngularJS 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

1
vote
2answers
39 views

Dynamic ng-model into ng-repeat AngularJS

I'm trying to generate dynamically ng-model directive in ng-repeat but I receive an error from browser. We get dynamically attributes of a type and I would like to set its in DOM. I'm recieving this ...
1
vote
2answers
39 views

Get value input form

I would like to retrieve the password value type for the display in the console.log . I use a html form with ng-model="passwd" to retrieve the value. And I then uses a controller with ...
1
vote
2answers
101 views

binding radio buttons to ng-model with angularjs

So this is the relevant part of my html-code. i tried binding the "formFriendsAll" scope to the ng-model. <form ng-submit="submitForm()" > <div class="col-sm-3"> <div ...
1
vote
2answers
360 views

Trigger ngModelController $parsers pipeline from a $watch

I'm writing a directive that requires ngModel and adds formatters and parsers to manipulate the value. It works great, but since the manipulation depends on external data I have to $watch, I'm looking ...
1
vote
2answers
228 views

Angular doesn't restore null-but-valid input value on model change when input is invalid

I have run across a weird/confusing behavior with <input> and form validation. Essentially, if input has an invalid numeric value (which sets form.$valid to false), if a model value is changed ...
0
votes
2answers
110 views

how to share a scope variable with ng-app's in AngularJS

I have two different ng-app running on same page. bookingApp calendarApp I want to share selected date scope variable from calendarApp to bookingApp. How I can achieve this functionality? Thanks, ...
0
votes
2answers
253 views

Search specific JSON data using angularjs tied to ng-model enteredData

I am using Angular trying to search JSON data for a specific Name entered by user. I am passing entered data into clickButton function, using angular.forEach for iteration and pushing the key/value ...
5
votes
1answer
290 views

ng-model outside controller

I'm trying to edit view outside ng-controller element. I was able to solve it by using $rootScope and dom manipulations, but I want to know how it can be solved by native angularjs? Html: ...
2
votes
1answer
276 views

Data binding with `ng-model` not working on some systems

Quite strange, but yes the same code works on one system but not on the other. I developed a HTML-5 based extension for Adobe Creative Cloud Applications (Adobe CC have the chromium framework built ...
1
vote
1answer
61 views

Autosuggest Search results using multiple, specific object properties using ng-model and filter

Here's the JS for a simple, Angular autosuggest: var app = angular.module('typeAhead', []); app.controller('TestCtrl', function($scope) { $scope.things = [ { name: "foo", description: ...
1
vote
1answer
65 views

Dynamically setting ng-model is breaking

I have a directive HTML template like this: textinput.html <label for="{{name}}">{{label}}</label> <input type="{{type}}" placeholder="{{placeholder}}" id="{{name}}" ...
0
votes
1answer
38 views

Bind and scope ng-repeat json elements

I've made a food take-out app and I'm trying to send the result using mandrill email. I'm able to use input form and send emails, however, I'm not able to bind and scope the filtered json ng-repeat ...
0
votes
1answer
28 views

Using scope with ng-model in md-select with ng-repeat to save and display a JSON element

I'm having two bug in my app development for phonegap and I'm hoping one of you might be able to help me out. I'm building a take-out app that has 3 different sections: Menu, Options and Order. In the ...
0
votes
1answer
33 views

How to get value of dynamically added input inside ng-repeat?

I am trying to get the value of inputs that are created when a box is clicked. These inputs are inside a ng-repeat. I tried sending item inside ng-click but since it is outside the ng-repeat it would ...
0
votes
1answer
47 views

How to post files to C# MVC model using the angular file uploader?

On my page, I have a simple chat client I've written. There are topics, within them messages, and the latter can contain files (the structure looks like this: Topics list. -> Every topic has a list ...
0
votes
1answer
51 views

Two way binding not working with contenteditable in directive template

I have created a directive with a template specified. I would like to see whatever i type in the debug div below the textbox. But debug shows only the initial value and its not getting updated. I ...
0
votes
1answer
26 views

AngularJS adding extra option to zend select

I'm trying to use angular to post content from a zend form into a modal and it keeps adding an extra option at the top that has blank text and value="? Number 3 ?" I see a number of threads that are ...
0
votes
1answer
206 views

Dynamically creating multiple dropdown and auto setting each dropdown in angularjs

I was able to dynamically creating multiple drop-down lists base on the same set of data in angularJS. However, I am having an issue trying to dynamically set the default value of each of the ...
0
votes
1answer
49 views

Checkboxes populated from scope object (http request) dont update json

I have a collection of checkboxes for Monday to Sunday and below that a list of objects that are loaded dynamically from an http request. I have a < pre > item that binds my object 'shifts' to the ...
0
votes
1answer
111 views

Make a NG-Options value select in same function as populating list

I am having some difficulties with selecting a value from an array in the same function that I populate the select using ng-options. I am trying to dynamically load a select list full of options and ...
0
votes
1answer
198 views

AngularJs Select ng-model not working with foreign key value

Let's say I have a service that provides a list of objects that I want to load as options in a <select> element. The service method is myReferenceList.getCachedList(). It returns an array of ...
0
votes
1answer
105 views

angular js array in model

I am repeating a form using ng-repeat. the repetition is to create a new form. I want to submit all forms data on single click. i am not able to find how I can assign multiple values in array. Here ...
0
votes
1answer
117 views

How to set ngModel's $viewValue of an input immediately despite debounce being set

Suppose, I want to apply a masking function to a text input. It could be to properly stylize the phone number input (for example, for input 5553334444, it would output (555) 333-4444), or just simply ...
0
votes
1answer
10 views

AngularJS: How ng-model binds the data to html when it should be otherwise?

I learnt that ng-model binds the html values to application data. But in below eg, where application data is predefined, it outputs the data to html. How/why is this happening? eg: ...
0
votes
1answer
373 views

AngularJS $scope not updating when using ng-model (ng-change fires?)

I'm new to Angular (and javascript), so there's probably a pretty simple reason that this isn't working. I've got a datepicker that gives me a date based on which I generate some content to display. ...
0
votes
1answer
2k views

Change of ng-model value on ng-click

I have a div in which i have four radio options in ng-repeat, my problem is when i click on the button the div with list class should be duplicated and the ng-model should change lets say if it is ...
0
votes
1answer
112 views

Getting values from an object into ng-model

I have resource that gets an object: .factory('Product', ['$resource', function($resource) { return $resource( 'api/product/:id', { Id: '@Id' }, { update: { method: 'PUT', isArray: ...
1
vote
0answers
88 views

viewChangeListeners not working in angular directive

So basically, I want a directive that updates the class of an input whenever the viewValue isn't empty. Here is the code. angular.module('app').directive('input', function() { return { ...
1
vote
0answers
81 views

Angular Nested Comments - Values undefined when submitting form

I am trying to get a dynamic script for nested comments to work. My first problem is that I don't know how I can do endless nesting. For now I planned to do 3 layers, cause I don't know how to make ...
1
vote
0answers
219 views

How do I autofill webservice data into input form in AngularJS?

I am trying to autofill input form fields by writing the number and pressing the search button. The data should come from a remote webservice. The goal is that AngularJS ng-model should bind the ...
0
votes
0answers
19 views

data management when changing states using Angular JS

I am working on an App using Ionic framework where I am trying to implement a sign-out function. I already have a sign-in function implemented using localStorage. This is how my sign-in implemented - ...
0
votes
0answers
40 views

ng-model return undefined with directive

I try to get value from html input tag in a directive, and always get undefined, this is my code: var app = angular.module('templateApp', []); app.controller('Ctrl', function ($scope, $http, $sce) ...
0
votes
0answers
24 views

NG-Model check if same data is already entered

I have a form that looks like this <form action="" method="post" class="form form--login"> <div class="form__field"> <label ...
0
votes
0answers
37 views

Angular - Cannot get custom directive to cooperate with ng-change

I have a very simple directive (named cooperate-with-ng-change) which requires ng-model and I'd like it to cooperate with ng-change. Restated, I'd like to be able to do <cooperate-with-ng-change ...
0
votes
0answers
23 views

AngularJS ng-model-options blur is not working with ng-change, Any solution for this issue?

I have dropdown field that i am populating value on page load so when user change value I have event firing using AngularJS ng-change to get some data that is working good, as soon as user change the ...
0
votes
0answers
31 views

How to set currentTime of ngVideo in vi-feedback?

I am using ngVideo directive (https://github.com/Wildhoney/ngVideo) to develop a video player. Following is my videoPlayer.html <section class="video" ng-video ng-model="interface"> <div ...
0
votes
0answers
10 views

ng-model Doesn't Update Form $modelValue

I came across a problem where form $modelValue doesn't get updated with ng-model value. I have a form like this: <div ng-controller="NameController as ctrl"> <form name="form" ...
0
votes
0answers
19 views

How to $apply without forcing $render on tests

I've extended the angularjs-jquery-timepicker library, which overrides the ngModelController's $render method for a directive's ngModel, and I'm trying to test a $watch(someValue, listener) call. For ...
0
votes
0answers
20 views

Unable to Dynamically Set Properties of an Object Using ng-repeat

I have an array of column objects and a query object. I am trying to create an input field for each column and bind that input field's value to a property in the query object. However, when I use the ...
0
votes
0answers
19 views

AngularJS Commentsystem - Replying not working

I have a little commenting system. The data comes from my intern API, created with Laravel. The system is nested. Also the comments have two fields "commentable_type" and "commentable_id", which is ...
0
votes
0answers
43 views

how to handle multiple checkbox in angularjs

i have a list of checkbox which is created dynamically based on the groups and items. below is the code im using to generate the list. how to use ng-modal to save the values back to db and during ...
0
votes
0answers
69 views

angular js span value to two way binding

<html ng-app="customControl"> <script src="js/angular.js"></script> <script src="js/jquery.js"></script> <script> angular.module('customControl', ...
0
votes
0answers
47 views

required attribute does not check whether ng-model is in the selectable options

I have a form in my AngularJS app where an account can select and update values, let's say VendorID and ProductID. Each of those values is set in a select box, with the current vendor driving the ...
0
votes
0answers
28 views

Angularjs Directive that create other directive

This is the data: $scope.messages=[ { text:'Message 1', replies: [{ text:'Reply to message 1 replies:[ {...} ...
0
votes
0answers
26 views

putting list item on the scope

I am trying to put a list element on the scope. users.html: <ul> <li ng-repeat="user in users | filter:nameText | orderBy:'firstName'"> <a href="#/user" ...
0
votes
0answers
176 views

AngularJS : Cannot read property of undefined in ng-repeat using ng-model

I'm working on a backend for a personality quiz where the user can send inn names for the different personalities, some questions, and alternative answers to the questions. The user will (hopefully) ...
0
votes
0answers
141 views

Apply custom directive parser before input directive parser

I'm building a directive to use in a input number control. This directive has to take the value (a number) entered by the user and replace all commas with dots. This is the directive: ...
0
votes
0answers
116 views

select option manipulate ng-model

I have a strange behavior on clicking in a select (option) list. servicse.js: services.factory('AppAPIService', function($resource){ return { serviceReports: ...
0
votes
0answers
31 views

AngularJS : Maintaining access to the model in element transclusion

Plunker: Direct Edit example. In the above plunker, I have a directive (direct-edit) which uses transclude: 'element', to surround the element with other markup. The directive requires: ...
0
votes
0answers
115 views

ngModel is not accessible from within a directive

Please give me some slack, this is my first post as I'm pretty new to angular. I'm trying to implement a directive that will verify if an account name is exist. While I've been using this kind of ...