Hmm, it seems you *don't* need to update a module to tell Angular that that module will use a particular service.
The @Injectable() decorator with its providedIn flag does this.
...which isn't obvious, and is the wisdom being imparted in every tutorial I have read so far. Even one written specifically for #Angular 11!
Am I missing something?
The official tutorial goes:
// no need to place any providers due to the `providedIn` flag...
So that's the final word then?
But there's also this section: https://angular.io/guide/dependency-injection-providers
which clearly goes: "By configuring providers, you can make services available to the parts of your application that need them."
And now I'm more confused -- this goes over my head. 🙃
...and this section gives a bit more perspective. Looks like providers might be an advanced topic...?
But at least, it seems, you can see it's just one of three ways to provide a service. But in some situations, a service can be "provided" using *something else* other than Angular's service class... and I don't know when you'd do that, and how.
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.