In my HTML I have this line:
the problem was that Priv class/table didn't have id property, and its Primary Key was field code. I had to add function :
Priv
id : function(priv) { return priv.code; },
in $scope.privNameSelect2options
$scope.privNameSelect2options