@Provider
decorators now take an additional argument, providedIn
.providedIn: 'root'
- telling your angular application that this service should be a singleton, available all throughout your application. You don't even need to inject it into a module!