Questions tagged [angularjs-ng-change]

The ngChange allows to evaluate given expression when user changes the input.

Evaluate given expression when user changes the input. The expression is not evaluated when the value change is coming from the model.

Note, this directive requires ngModel to be present.

Usage

as attribute

<input
  ng-change="expression">
...
</input>

Parameters

ngChange – {expression} – Expression to evaluate upon change in input value.

References:

http://docs.angularjs.org/api/ng.directive:ngChange

265 questions
8
votes
1 answer

Angular JS Action on ng-change the select dropdown

I have a simple table with three rows and two values for each row - date and state: Red {{item.redDate}}
shreyansh
  • 1,637
  • 4
  • 26
  • 46
6
votes
1 answer

How can I detect Touchend or end of changing a range value?

I'm using AngularJS with Ionic Framework. I'm developing a live communication application. I have a range slider ionic docu. If I use ng-change every step calls my callback, but I only want to transfer the end result. On desktop I can use ng-mouseup…
6
votes
1 answer

Angular model fails to update after select option is filtered out

Trying to figure out why the model does not update when the bound selected option no longer exists. I would expect the model's property to update to undefined/null/empty string. Situation: One select drives another select using filter. After…
5
votes
1 answer

oninput not working in Angular. Alternative?

Im trying to create a function that reads the value of an input and triggers a series of true/false, however the code below keeps returning "passStrength is not defined." From what I can find, oninput isn't supported by Angular. How can achieve this…
Christian Hill
  • 378
  • 1
  • 3
  • 17
5
votes
1 answer

select2, ng-model and angular

Using jquery-select2 (not ui-select) and angular, I'm trying to set the value to the ng-model. I've tried using $watch and ng-change, but none seem to fire after selecting an item with select2. Unfortunately, I am using a purchased template and…
Noy
  • 1,258
  • 2
  • 11
  • 28
5
votes
2 answers

ng-change event not firing inside the loop

function friendControllerTest($scope, $http) { $scope.loading = true; $scope.addMode = false; $scope.countryList = []; $scope.stateList = []; function getAllCountry() { $http({ method: 'Get', …
I Love Stackoverflow
  • 6,738
  • 20
  • 97
  • 216
5
votes
3 answers

Is there a way in AngularJS to react on model changes without using $watch?

I'm implementing a simple spinner control in AngularJS and I want to react both on user input and changes from +/- buttons. Here is my HTML:
2ooom
  • 1,760
  • 1
  • 23
  • 37
5
votes
1 answer

AngularJS ng-repeat with ng-change

I'm trying to have a way to catch the change of a variable inside of an ngRepeat so that I can modify other properties. So I have this HTML:
Scott
  • 163
  • 2
  • 11
5
votes
1 answer

Access select element in ng-grid

i have this grid options: $scope.ngOptions = { data: 'data', columnDefs: [ {field: 'Status', displayName: "Status", cellTemplate: selectTableTemplate, enableCellEdit: true}, {cellTemplate: '
Asaf
  • 2,158
  • 2
  • 25
  • 40
4
votes
2 answers

pass two values in ng-repeat and ng-change

Controller: var response = { "json": { "response": { "servicetype": "100", "functiontype": "101", "statuscode": "success", "data": [ { "countryid": 1, "countryname": "India", …
4
votes
0 answers

call ng-change when model has changed in angular component

i have update to angular 1.5 and now want to use components instead of directives. My problem is that my ngModel will not run ng-change after i have changed my value. all solutions i found didn't match my problem. i have following…
4
votes
3 answers

Rgba value is not updated in ng-style

I have a div which has an ng-style attribute with an rgba value that uses a $scope variable for the alpha value: ng-style="{'background-color': 'rgba(255,0,0,{{ alphaValue / 100}})'}" I have an input slider which changes the value of alphaValue. I…
GusGus
  • 230
  • 6
  • 16
1
2
3
17 18