I'm trying to reuse several pages/modules between two apps. I understand you can create libraries and publish those modules to NPM. My problem is dependency injection.
Imagine you have two cookbook apps that load recipes via a RecipeService. One is totally static for a published cookbook, so its RecipeService uses JSON files. The other uses a REST API. It's easy to write two different apps with two different RecipeServices.
But how can I create a RecipePageModule that consumes an interface for RecipeService? If I try to define something like RecipeServiceInterface and "inject" that, I just get "Can't resolve all parameters for RecipePage," which makes sense. Is there a way to say, in a module, "expect the parent AppModule to provide me with a RecipeService"?