Depends on:
In JIT mode this code works.
@NgModule({
providers: [
{provide: SomeSymbol, useFactor: (i) => i.get('someSymbol'), deps: ['$injector']}
]
})
export class MyModule {}
but in AoT it needs to be written like so:
export factoryForSomeSymbol = (i) => i.get('someSymbol');
@NgModule({
providers: [
{provide: SomeSymbol, useFactor: factoryForSomeSymbol, deps: ['$injector']}
]
})
export class MyModule {}
ngc should be smart enough together with tsickle to perform this operation automatically for the developer.
Depends on:
In JIT mode this code works.
but in AoT it needs to be written like so:
ngcshould be smart enough together withtsickleto perform this operation automatically for the developer.