import { NgModule , ANALYZE_FOR_ENTRY_COMPONENTS } from "@angular/core" ; import { BrowserModule } from "@angular/platform-browser" ; import { FormsModule } from "@angular/forms" ; @ NgModule ( { imports : [ BrowserModule , FormsModule ] , declarations : [ ] , exports : [ ] } ) export class ModuleWithEntryComp { static withComponents ( components ) { return { ngModule : ModuleWithEntryComp , providers : [ { provide : ANALYZE_FOR_ENTRY_COMPONENTS , useValue : components , multi : true } ] } ; } }