问题描述
我刚刚将我使用的 Angular Material 版本更新为 1.0.6
I just updated the version of Angular Material I am using to 1.0.6
现在,当我使用 md-select + md-option 时,虽然所有正确的选项和相应的 md-option DOM 元素都显示在检查器中,但单击时不显示下拉列表,而是显示页面(Chrome 浏览器)完全冻结.不会抛出任何控制台错误.
Now when I use md-select + md-option, although all the correct options and corresponding md-option DOM elements display in the inspector, the drop down list does not display upon click, and instead the page (Chrome browser) freezes completely. No console error is thrown.
这是我的代码:
md-select(
aria-label='select number of seats'
ng-show="bookable.seatsperbooking>1"
ng-model="appt.seats")
md-option(
ng-repeat='num in getnumber(seatsallowed) track by $index'
value='{{num}}') {{ num }}
这是检查器的屏幕截图,它显示了选项 DOM 元素的正确数量:选项截图
and here is a screenshot of the inspector, which shows the correct number of option DOM elements:screenshot of options
推荐答案
遇到同样的问题.将 AngularJS 更新到较新的 1.5.5 版(带有 Angular Material 1.0.7)后解决了这个问题.
Having same problem.After updating AngularJS to newer version 1.5.5 (w/ Angular Material 1.0.7) solved the problem.
这篇关于Angular Material md-select 不显示 md-options 并在单击时冻结页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!