Questions tagged [angularjs-model]

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.

From Angularjs documentation:

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.

90 questions
0
votes
2 answers

Referencing the element that is calling a controller function Angularjs ( ng-change / ng-blur / ng-* ? )

The original question asked about how to determine which element called the controllers blurr function, but I didn't clarify that I was not specifically asking about ng-blur, but ng-* (ng-change, ng-focus, ng-mouseover, ng-*) in general. So, with…
0
votes
1 answer

Referencing the element that's calling a controller function Angularjs

Fairly simple but I can't figure out the term I need to google. How do I reference whichever element is calling the controllers blurr function? html
0
votes
0 answers

Angular Model with Directives

So I'm getting an error in my template with it not liking the ng-model="event.{{name}}". I was wondering how I can get the model to be ng-model="event.date_end". I am also wondering if this jquery datetimepicker will initialize correctly in the link…
jaruesink
  • 1,205
  • 2
  • 14
  • 24
0
votes
1 answer

Updating AngularJS models on ng-click, DOM not responding

I have an input box and a textarea that are held inside a modal window that is open upon a button-click. The same input box and textarea are in use by a second modal with a different purpose. Each modal is under a different controller. So when I…
user2465164
  • 917
  • 4
  • 15
  • 29
0
votes
1 answer

AngularJS Model-level Helpers

I have a user model that looks like: { accessFailedCount: 0 active: false created: "2014-05-09T14:39:56.867Z" email: "austin@austin.com" emailConfirmed: false fullName: "Austin Frtizer" id: "536ce8bce352b815b8791f53" …
amcdnl
  • 8,470
  • 12
  • 63
  • 99
0
votes
1 answer

How to filter a specific item from an array in angularJS?

here is my controller : varDemoApp.controller('SimpleController',function($scope){ $scope.customers = [{name:'Ahsan',city:'Khulna'}, {name:'Rokib',city:'Bogra'}, {name:'Asad',city:'Satkhira'}]; }); And my…
Ahsan 02
  • 61
  • 2
  • 15
0
votes
1 answer

Generate random model name in ng-repeat

In my angular.js project, I have a loop which contains a input field and when user…
MKB
  • 7,587
  • 9
  • 45
  • 71
0
votes
2 answers

AngularJS which scope does an ng-model point to?

Still training myself to think In angularian... I think that it would it be correct if I think of the ng-model attribute as a reference to some data element in some parent scope... [would it?] I am trying to understand to which scope will an…
epeleg
  • 10,347
  • 17
  • 101
  • 151
0
votes
3 answers

Bind dynamic element creation to keypress with AngularJS

I am trying to append an element to the DOM from user text input using AngularJS. The desired behaviour is: User types string into input ng-model "newTask" Presses enter key Dynamic element is then appended to the DOM The relevant section of HTML…
Barney
  • 1,820
  • 5
  • 29
  • 50
0
votes
1 answer

angular js: updating $watcher from directive not working

I have an application where I have a 2 drop down boxes, one for state and another for city, and a directive that has a mock up of values not tied to anything. I need to establish the connection between the directive and these two drop down…
sksallaj
  • 3,872
  • 3
  • 37
  • 58
0
votes
2 answers

Definition of model in frontend JS context

I usually work backend development, where a model is defined as an in-memory representation of either some database query operation or internal, pre-initialized data fields. It is processed by controller or service methods and passed to the view…
Jason
  • 11,263
  • 21
  • 87
  • 181
0
votes
2 answers

AngularJS ng-model in template passed to directive controller

I've got a directive with a controller, that builds a form for posting comments to an API via CommentsService My directive looks a bit lik this: app.directive('appComments', function( CommentService ) { return { restrict: 'E', …
0
votes
1 answer

AngularJS removing elements when values change

In my controller, I have a variable: $scope.myVar = { "id": 13459045, "firstName": "Joe", "lastName": "McCarthy", "createdBy": 0, "status": "active", "dollarValue": 0 } In my page, I have input fields mapped to the variable:
C1pher
  • 1,933
  • 6
  • 33
  • 52
0
votes
0 answers

angularjs select element binding

I've bound newParty.party_type.code model to dropdown. On changing its value from controller it is adding another option with value ? number:2138 ? even if option with value 2138 is already contained in select element.
Shamoon
  • 41,293
  • 91
  • 306
  • 570
1 2 3 4 5
6