I'am sure I am doing something wrong, but even debugging on Angular.js I can't find the mistake
I am following the angular basic tutorial here: https://docs.angularjs.org/tutorial/step_03 All examples on tutorial works fine. But I wanted to try some angular cool features and added code by myself to the examples of step 3
index.html: https://gist.github.com/tario/f07239992eea75535421
controller.js https://gist.github.com/tario/1b6155b5c97e747abe32
The filter is defined here: https://gist.github.com/tario/1b6155b5c97e747abe32#file-controllers-js-L16
This produce the following error as soon as I enable the uppercase using the checkbox:
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [["fn: $watchCollectionWatch; newVal: 62; oldVal: 59"],["fn: $watchCollectionWatch; newVal: 65; oldVal: 62"],["fn: $watchCollectionWatch; newVal: 68; oldVal: 65"],["fn: $watchCollectionWatch; newVal: 71; oldVal: 68"],["fn: $watchCollectionWatch; newVal: 74; oldVal: 71"]] http://errors.angularjs.org/1.2.17/$rootScope/infdig?p0=10&p1=%5B%5B%22fn%3…20%24watchCollectionWatch%3B%20newVal%3A%2074%3B%20oldVal%3A%2071%22%5D%5D at http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:78:12 at Scope.$get.Scope.$digest (http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:12396:19) at Scope.$get.Scope.$apply (http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:12622:24) at HTMLInputElement. (http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:17016:11) at http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:2810:10 at Array.forEach (native) at forEach (http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:320:11) at HTMLInputElement.eventHandler (http://xxxxxxx.doesntexists.com:8000/app/bower_components/angular/angular.js:2809:5)
I don't know if doing the filter that way is the best practice, but I want to know why is failing since the only thing I am doing is create a new array with the transformed content of the other array, it's ok ???