Angular Material md-select not displaying md-optio

2019-07-04 11:45发布

I just updated the version of Angular Material I am using to 1.0.6

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.

Here is my code:

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 }}

and here is a screenshot of the inspector, which shows the correct number of option DOM elements: screenshot of options

3条回答
Ridiculous、
2楼-- · 2019-07-04 12:20

Same issue here. I have Angular Material 1.1.0.

Updated Angular from 1.3.15 to 1.5.8. Fixed.

查看更多
淡お忘
3楼-- · 2019-07-04 12:28

Having same problem. After updating AngularJS to newer version 1.5.5 (w/ Angular Material 1.0.7) solved the problem.

查看更多
何必那么认真
4楼-- · 2019-07-04 12:34

This was happening because the Angular + Angular Material versions I was using were incompatible. Angular Material 1.0.7 seems to require at least Angular 1.4 (Angular Material 1.0.7 was not working with Angular 1.3.20)

查看更多
登录 后发表回答