ElemeFE / element-angular

Element for Angular
https://element-angular.faas.ele.me
MIT License
530 stars 121 forks source link

按项目主页的说明引入单个组件 失败。 #77

Closed wgf4242 closed 6 years ago

wgf4242 commented 6 years ago

Issue Type:

Version & Environment:
ng 5.

Description:

Unexpected value 'undefined' imported by the module 'AppModule'

https://stackblitz.com/edit/angular-el-angular-test

# app.module.ts
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    BrowserAnimationsModule,
    ElChildModules.ElDataPicker
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {
}

[Solved] Thanks to WittBulter imports:[ ElChildModules.ElInputsModule.forRoot(), ElChildModules.ElDateModule.forRoot() ]

unix commented 6 years ago

this issue maybe a typo: ElDataPicker => ElDateModule.

All submodules please see here

wgf4242 commented 6 years ago

I used ElChildModules.ElDateModule or ElChildModules.ElDateModule.forRoot(), then got another error

preview-e0903b47b015eda0b7ee.js:1 ERROR Error: StaticInjectorError(AppModule)[ElInput -> ElFormItem]: StaticInjectorError(Platform: core)[ElInput -> ElFormItem]:

https://stackblitz.com/edit/angular-el-angular-test

unix commented 6 years ago

apparent, date component depend on input component.