-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Closed
Copy link
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerfeatureIssue that requests a new featureIssue that requests a new feature
Milestone
Description
Depends on:
- Rewrite Tsickle to use TypeScript v2.1 transforms API see Rewrite Tsickle to use TypeScript v2.1 transforms tsickle#285
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.
lacolaco, dormd, tsvetomir, deebloo, shlomiassaf and 4 moreDzmitryShylovich, PatrickJS, otodockal, deebloo, devoto13 and 1 more
Metadata
Metadata
Assignees
Labels
area: compilerIssues related to `ngc`, Angular's template compilerIssues related to `ngc`, Angular's template compilerfeatureIssue that requests a new featureIssue that requests a new feature