I have a component named HostComponent , when I put this component as a start up component everything is working and my application working fine.
Then I create one more module called AppModule and Wrap the host component inside the app component
import { Component, Input } from '@angular/core';
@Component({
selector: 'main-app',
template: '<ds-framework-host >Loading...</ds-framework-host>'
})
export class AppComponent {
constructor(){
}
}
AppModule
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
,HostModule
],
schemas:[],
bootstrap: [AppComponent],
entryComponents: [
SomeOtherEntryComponentsHere
]
})
export class AppModule {
}
Index.html
<body>
<main-app></main-app>
</body>
Host Module(where Host Component exist)
@NgModule({
declarations: [
HostComponent
],
imports: [
BrowserModule,
FormsModule,
DashboardModule,
],
schemas:[CUSTOM_ELEMENTS_SCHEMA],
exports:[]
})
export class HostModule {
}
When I try to run the application I am getting the below error
To suppress this error I have added CUSTOM_ELEMENTS_SCHEMA to app module based on the below reference. CUSTOM_ELEMENTS_SCHEMA added to NgModule.schemas still showing Error
My error goes way but my <ds-framework-host>
shows loading.. but nothing is executing inside this child component. In developer tools no error is showing
Angular Version - 4.0.0.0
How Can I resolve this error and why it's happening?