f289411fa9
Angular v9 schematics should print out a link to the migration guide associated with each schematic. This way, users have an easy way to find more information about the automatic code transformations they will see with `ng update`. PR Close #33258 |
||
---|---|---|
.. | ||
BUILD.bazel | ||
README.md | ||
index.ts | ||
util.ts |
README.md
Dynamic queries migration
Automatically migrates dynamic queries to remove their static
flag. This flag will no
longer be necessary in version 9 for dynamic queries, as false
is the default value.
Before
import { Directive, ViewChild, ContentChild, ElementRef } from '@angular/core';
@Directive()
export class MyDirective {
@ViewChild('child', { static: false }) child: any;
@ViewChild('secondChild', { read: ElementRef, static: false }) secondChild: ElementRef;
@ContentChild('thirdChild', { static: false }) thirdChild: any;
}
After
import { Directive, ViewChild, ContentChild, ElementRef } from '@angular/core';
@Directive()
export class MyDirective {
@ViewChild('child') child: any;
@ViewChild('secondChild', { read: ElementRef }) secondChild: ElementRef;
@ContentChild('thirdChild') thirdChild: any;
}