Implement a correct scope in an Angular library

27 views Asked by At

I have a question about how to implement a correct API exposure in Angular libraries.

So basically I have a Service, and a component inside my library that consumes some methods of the Service. Those methods thus cannot be private, since my component has to get access to them. But I don't want to expose those methods to the user publicly. In other words: those methods should be consumed internally (thus not private), but should not be consumed externally.

I know that there is the possibility to expose the API through public-api.ts but this is not giving me enough control on it.

How do you achieve this?

0

There are 0 answers