Declare RoomsComponent in the Shared module, and then import this shared module into the modules that need it. The following is an example of one of my common modules:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { StarComponent } from './star.component';
@NgModule({
imports: [ CommonModule],
exports : [
CommonModule,
FormsModule,
StarComponent
],
declarations: [ StarComponent ],
})
export class SharedModule { }
, StarComponent . , , .