mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
|
|
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| index.ts | ||
| inject_flags_migration.ts | ||
| README.md | ||
Remove InjectFlags migration
Replaces the usages of the deprecated InjectFlags symbol with its non-deprecated equivalent,
for example:
Before
import { inject, InjectFlags, Directive, ElementRef } from '@angular/core';
@Directive()
export class Dir {
element = inject(ElementRef, InjectFlags.Optional | InjectFlags.Host | InjectFlags.SkipSelf);
}
After
import { inject, Directive, ElementRef } from '@angular/core';
@Directive()
export class Dir {
element = inject(ElementRef, { optional: true, host: true, skipSelf: true });
}