mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The commit introduces a new function to assist users who want to lazy load services and use the DI system to create them.
Example:
```ts
import {injectAsync} from 'angular/core';
class MyCmp {
someSvc = injectAsync(() => import('..'));
async onClick() {
(await this.someSvc()).handleClick();
}
}
```
|
||
|---|---|---|
| .. | ||
| global | ||
| primitives | ||
| resources | ||
| rxjs-interop | ||
| schematics | ||
| src | ||
| test | ||
| testing | ||
| BUILD.bazel | ||
| index.ts | ||
| package.json | ||
| PACKAGE.md | ||
| public_api.ts | ||
| tsconfig-build.json | ||
| tsconfig-test.json | ||