I have a angular module (@ngModule) named SubModule which contains a component named SubComponent with css selector 'app-subcomp'.
I have imported this sub module into my AppModule (application shell). So my AppModule (@ngModule) contains AppComponent with 'app-root' css selector and one sub module (SubModule).
When i write '< app-subcomp >' into my app.component.html, it is not rendering sub.component.html.
but when i directly declare my SubComponent into AppModule, its working fine.
Not sure why it is not rendering in first case?
Please suggest.
Thank You
sub.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SubComponent } from './sub.component';
@NgModule({
imports: [ CommonModule ],
declarations: [SubComponent],
})
export class SubModule { }