使用ng-option——
http://jsfiddle.net/sseletskyy/uky9m/1/
以及select中加入自定义指令 convert-to-number
.directive('convertToNumber', function () {
return {
require: 'ngModel',
link: function link(scope, element, attrs, ngModel) {
ngModel.$parsers.push(function (val) {
return parseInt(val, 10);
});
ngModel.$formatters.push(function (val) {
return '' + val;
});
}
};
});