Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
The Provide initializer schematic transforms
import { APP_INITIALIZER } from '@angular/core';
const providers = [{
provide: APP_INITIALIZER,
useFactory: (a: ServiceA, b: ServiceB) => {
return () => a.init();
},
deps: [ServiceA, ServiceB],
multi: true,
}];
to:
const providers = [
provideAppInitializer(
((a: ServiceA, b: ServiceB) => {
return () => a.init();
})(inject(ServiceA), inject(ServiceB))
),
];
But a provider definition is not a valid injection context.
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
The Provide initializer schematic transforms
to:
But a provider definition is not a valid injection context.