为什么AngularJS在select中包含一个空选项?
问题: I've been working with AngularJS for the last few weeks, and the one thing which is really bothering me is that even after trying all permutations or the configuration defined in the specification at http://docs.angularjs.org/api/ng.directive:select , I still get an empty option as the first child of select element. 在过去的几周里,我一直在使用AngularJS,而令我困扰的一件事是,即使尝试了所有置换或 http://docs.angularjs.org/api/ng 规范中定义的配置, .directive:select ,我仍然得到一个空选项作为select元素的第一个子元素。 Here's the Jade: 这是玉: select.span9(ng-model='form.type', required, ng-options='option.value as option.name for option in typeOptions'); Here