1

I mostly used ng-change but this time ng-change won't trigger It has also ng-model and also it is inside my app and controller. Same syntax for what I use in other ng-change. I got 3 days debugging this but still i cannot find the solution.

Here is the input:

 <input type="text" class="form-control" ng-change="search()" ng-model="count_time">

Here is the controller:

var app = angular.module("myCurriform", []);


    app.controller("standardCtrl", function($scope,$http,$filter,$location,$window) {


      $scope.search = function() {
        console.log($scope.count_time);



      };


    });
georgeawg
  • 48,608
  • 13
  • 72
  • 95
Tep Tep
  • 59
  • 3
  • 16

1 Answers1

0

Use a watcher-function in your controller

<input type="text" class="form-control" ng-model="count_time">

JS:

$scope.$watch('count_time', function() {
  $scope.search();
});
Abdul Rafay
  • 787
  • 6
  • 21