bootstrapApplication • Angular
The root component passed into this function must be a standalone one
You can add the list of providers that should be available in the application injector by
specifying the providers field in an object passed as the second argument:
await bootstrapApplication(Root, { providers: [ {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'} ]});
The importProvidersFrom helper method can be used to collect all providers from any
existing NgModule (and transitively from all NgModules that it imports):
Note: the bootstrapApplication method doesn't include Testability by
default. You can add Testability by getting the list of necessary
providers using provideProtractorTestingSupport() function and adding them into the providers
array, for example: