Reputation: 137
I installed an internal component library that has components with export statement that I can use in my angular project. I can import the component into my component through the import statement where it picks up the component name. The question is how do I then just reference that in my HTML? I setup on my constructor a 'private myComponent: MyComponent' but then do I need to initialize it I assume to then in my HTML file use ? I only see the private myComponent greyed out.
Upvotes: 0
Views: 2267
Reputation: 3820
Add the library module(Whatever you are using) in imports in AppModule.ts
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule,LibraryModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
and in HTML
<MyComponent></MyComponent>
Upvotes: 1