Suppose we have a service SomeService that is declared within a library without the providedIn: root injectable metadata configuration.
@Injectable()
export class SomeService { ...}
And within our application we put SomeService in the providers array for bootstrapApplication.
import { SomeService} from 'SomeLibrary';
bootstrapApplication(AppComponent, {
providers: [
SomeService,
],
});
Will this essentially create a SomeService singleton for the entire application the way providedIn: root does?
>Solution :
As I understand angular dependency injection, this will define the service in the platform injector which is the parent injector of the root injector.
The result is not exactly the same from the dependency injectors point of view.
In reference to your question ("Will this essentially create a SomeService singleton for the entire application") the answer is: "yes"