Angularjs ng-options using number for model does not select initial value
Angular’s documentation for the ng-select directive explains how to solve this problem. See https://code.angularjs.org/1.4.7/docs/api/ng/directive/select (last section). You can create a convert-to-number directive and apply it to your select tag: JS: module.directive(‘convertToNumber’, function() { return { require: ‘ngModel’, link: function(scope, element, attrs, ngModel) { ngModel.$parsers.push(function(val) { return val != null ? parseInt(val, 10) : null; }); … Read more