Pablo Reyes Pablo Reyes - 7 months ago 35
AngularJS Question

Select Issue - angular2-mdl-ext [Angular 4.0]

I'm using: Angular 4.0 and for material: https://github.com/mseemann/angular2-mdl

extension: http://mseemann.io/angular2-mdl-ext/select

The issue is using the Select Component, it always stay open. Doesn't look like it's the proper behaviour.

Looks like this:

enter image description here

Here's the Demo App:

package:
"@angular-mdl/core": "^4.0.3",
"@angular-mdl/popover": "^0.6.3",
"@angular-mdl/select": "^0.10.4",


https://plnkr.co/edit/ENjMu4?p=preview

am i doing something wrong or missing something?

QoP QoP
Answer Source

You just forgot to import the Select component css.

In order to import the missing styles, you can add

@import url('https://unpkg.com/@angular2-mdl-ext/select@0.10.3/select.css');

in your main style.cssfile.

If you are using webpack & scss in your local machine, you can import them like this as well

@import '~@angular-mdl/select/select';

plnkr