How can you configure the injector to use an existing object for a token instead of having it instantiate a class instance?
Simply add the object instance or literal to the providers array.
Use the useValue provider configuration and set that equal to an existing object or an object literal.
useValue
It is not possible. Providers can be configured only with class types.
Make use of the asValue provider configuration property, setting it to true. Configuring dependency providers
asValue