Gbuomprisco / ng2-material-select

Angular 2 Material-like Select Component
35 stars 14 forks source link

Uncaught Error: Unexpected value 'undefined' declared by the module 'AppModule' #17

Closed aderbas closed 8 years ago

aderbas commented 8 years ago

I try to use ng2-material-select in my project. I'm using angular-cli. Intalled by npm npm install ng2-material-select --save and configure in my project

import { Ng2SelectModule }      from 'ng2-material-select';
import { Ng2Select }            from 'ng2-material-select';

@NgModule({
  declarations: [
      ....,
      Ng2Select
  ],
  imports: [
     ....,
    Ng2SelectModule
  ]
 ...
})

Before run ng serve gets this error: Uncaught Error: Unexpected value 'undefined' declared by the module 'AppModule'. if I remove Ng2 for declarations and imports, project back works.

aderbas commented 8 years ago

Angular 2 does not use more directives: [...] on Component({ ... }) as shown in the documentation

Gbuomprisco commented 8 years ago

True, it's out of date right now! :) Hope this is solved