好的,我在发布它时就知道了,但我想我会发布答案,因为我没有在任何其他线程中看到它。我在 javascript 中的对象显然比 Angular 更智能,或者至少 Angular 比 Zend 更智能。
Zend 正在使用 id 为引号中的选择选项创建选项,因此它们显示为字符串。对象的属性已初始化为整数,显然 angular 太聪明了,无法将它们进行比较。
将属性强制为范围内的字符串似乎已纠正了该问题。例如
listsApp.controller(
'EditListController',
[
'$scope', '$element', '$rootScope', '$http', 'title', 'list', 'close',
function ($scope, $element, $rootScope, $http, title, list, close) { //ngDialog
$scope.title = title;
$scope.list = list;
// angular fails on zend string option values if id is an integer
$scope.list.ListtypeId = '' + list.ListtypeId;
$scope.origTypeId = $scope.list.ListtypeId;
// ....
}