afriedman111
afriedman111

Reputation: 2341

Custom Angular library component not rendering in template

I am trying to consume 2 custom Angular 9 libraries. One contains services and the other components. I seems that I imported the services and module containing the components correctly in my consuming app.module. The library with the services imports fine and the services are usable. When I try to use a component from the other library module in a template, the component isn't rendered and there are no errors. If I import the component into the routing module and and wire it up to a route, the component renders when navigating to the route.

Why isn't the module rendering when used in a template?

Upvotes: 0

Views: 1065

Answers (1)

mohamed saeed
mohamed saeed

Reputation: 303

If your library code or its templates depend on other libraries (such as Angular Material, for instance), you must configure your library with those dependencies.

reference: https://angular.io/guide/creating-libraries

Upvotes: 0

Related Questions