Reputation: 2341
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
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