編譯之後在瀏覽器中我得到這個問題:我使用角4我的項目,對於範圍滑塊編寫代碼
moduleId should be a string in "Ng2SliderComponent
在編譯時我下面讓錯誤:
Argument of type '{ selector: string; templateUrl: string; directives: typeof SlideAbleDirective[]; changeDetection...' is not assignable to parameter of type 'Component'. Object literal may only specify known properties, and 'directives' does not exist in type 'Component'.
如果您發佈的相關代碼 – Und3rTow
請張貼有意義的代碼 –
我app.module.ts是「進口{} BrowserModule這將是有益@角/平臺的瀏覽器'; 從'@ angular/core'導入{NgModule}; 從'@ angular/forms'導入{FormsModule}; 從'@ angular/http'導入{HttpModule}; 從'./app.component'導入{AppComponent}; 從'./Slider/ng2-slider.component'導入{Ng2SliderComponent}; @NgModule({ 聲明: AppComponent, Ng2SliderComponent, SlideAbleDirective ], 進口: BrowserModule, FormsModule, HTTP模塊 ], 提供商:[], 自舉:[AppComponent] } ) export class AppModule {} – Raja