1, with the Ng-repeat loop output encountered very strange problem:
Error: [Ngrepeat:dupes] Http://errors.angularjs.org/1.4.6/ngRepeat/dupes?p0=x%20in%20result&p1=stri ... 83%ef%bc%8c%e7%bb%93%e6%9e%9c%e6%98%af%ef%bc%9a%e4%bd%a0%e8%be%93%e4%ba%86
At Angular.min.js:6
At angular.min.js:279
At Object.fn (angular.min.js:129)
At N. $digest (angular.min.js:130)
At N. $apply (angular.min.js:133)
At Htmlinputelement.<anonymous> (angular.min.js:253)
At Htmlinputelement.c (angular.min.js:35)
This means that ng-repeat cannot have duplicate data: solution: ng-repeat= "keys in NewList track by $index", plus track by $index, or trace by any of the normal values, As long as you can uniquely identify each item in the array, you can
2, data two-way binding failure, is clearly in the controller inside to $scope.xxx assignment, on the page xxx leng display, but click on the input box or form form of the submit button, XXX data information is displayed.
Workaround: Add $scope. $apply ();
$scope. $apply (function
$scope. XXX = "You assign the value";
});
In general, we do not need to add this code manually, because the ANGULARJS itself is called when needed in order to achieve the effect we see the data two-way binding.
But if you refer to an external plug-in or other, create or update $scope in the callback function . XXX data, because the external plug-in itself has been out of the scope of ANGULARJS, so data bidirectional binding here is not effective, can only be manually added $scope.$ Apply () to notify the page to get the data.
Reference URL: http://www.bdqn.cn/news/201409/15295.shtml
Angularjs Problem Aggregation