Very classical situation where I try to use some component in another module :
Foreign component :
import { Component, ViewEncapsulation,
ElementRef, ViewChild, Input, Output,
EventEmitter } from '@angular/core';
declare var __moduleName: string
@Component({
moduleId: __moduleName,
selector: 'bidule',
templateUrl: 'bidule.html',
styleUrls: [],
encapsulation: ViewEncapsulation.None
})
export class BiduleComponent {
@Input() config: { }
constructor(protected elRef: ElementRef) {
}
}
// template : <p>basic text</p>
Foreign module :
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BiduleComponent } from './bidule'
@NgModule({
imports: [
],
declarations: [
BiduleComponent
],
exports: [
BiduleComponent
]
})
export class BiduleModule {}
Main component :
...
import { BiduleComponent } from '../../bidule/bidule'
...
// template : <bidule></bidule>
Main module :
import { BiduleModule } from '../../bidule/module'
// ...
@NgModule({
imports: [
// ...
BiduleModule
]
})
I believe I checked everything :
https://stackoverflow.com/questions/44429996#44430230
If you have any idea. Thanks in advance.
(bidule is a french word for thingamajig)