J'essaye de construire mon Angular 5 app, et je reçois l'erreur:
Impossible de déterminer le module pour la classe ThreadListTabsComponent dans /home/brightwater/Differ/src/app/thread-lists/thread-lists.component.ts! Ajoutez ThreadListTabsComponent au NgModule pour le corriger.
C'est déroutant car j'importe le composant incriminé dans le module:
thread-lists.module.ts:
import { OtherModules } from './modules-everywhere';
import { NgModule } from '@angular/core'
import { SomeOtherComponents } from './other-components.component';
import { ThreadListTabsComponent } from './thread-list-tabs.component';
@NgModule({
imports:
[
OtherModules
],
declarations: [
OtherComponents,
ThreadListTabsComponent
],
exports: [
OtherComponents,
ThreadListTabsComponent
],
providers: [ ThreadListsService ]
})
export class ThreadListsModule { }
Voici le composant:
thread-list-tabs.component.ts
import { Component } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Router } from '@angular/router';
import { ThreadListsService } from './thread-lists.service';
@Component({
moduleId: module.id,
selector: 'thread-list-tabs',
templateUrl: 'thread-list-tabs.component.html',
styleUrls: ['thread-list-tabs.component.css']
})
export class ThreadListTabsComponent {
// Stuff this component does
}
app.module.ts
import { NgModule } from '@angular/core'
import { ThreadListsModule } from './thread-lists/thread-lists.module'
import { OtherModules } from './other.modules'
import { AppComponent } from './app.component'
@NgModule({
imports: [
OtherModules,
ThreadListsModule
],
declarations: [
AppComponent
],
providers: [ SomeService ],
bootstrap: [ AppComponent ]
})
export class AppModule { }
Y a-t-il quelque chose qui me manque?
Cela ressemble à un problème de casse de nom de fichier, voir le problème décrit sur angular git repo (https://github.com/angular/angular-cli/issues/10732) =