Angular Material md-select not displaying md-optio

2019-07-04 12:21发布

问题:

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

回答1:

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)



回答2:

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



回答3:

Same issue here. I have Angular Material 1.1.0.

Updated Angular from 1.3.15 to 1.5.8. Fixed.