x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Yes
Followup to https://github.com/angular/angular-cli/issues/14553#issuecomment-496915624
Running ng update @angular/core --from 7 --to 8 --migrate-only on 8.0.0 does not migrate.
But going back to rc.0 will prompt the migration again.
git clone https://github.com/rip222/viewChild-test-ng8
cd viewChild-test-ng8
npm i
kamik@RED-X1C6 MINGW64 /d/sandbox/viewChild-test-ng8 (master)
$ ng update @angular/core --from 7 --to 8 --migrate-only
Using package manager: 'npm'
Collecting installed dependencies...
Found 30 dependencies.
Package "@angular\\core\\schematics\\migrations.json" was found but does not support schematics.
npm install @angular/[email protected] --save-exact --save-dev, commit to gitkamik@RED-X1C6 MINGW64 /d/sandbox/viewChild-test-ng8 (master)
$ ng update @angular/core --from 7 --to 8 --migrate-only
------ Static Query Migration ------
With Angular version 8, developers need to
explicitly specify the timing of ViewChild and
ContentChild queries. Read more about this here:
https://v8.angular.io/guide/static-query-migration
------------------------------------------------
UPDATE src/app/app.component.ts (309 bytes)
$ ng update @angular/core --from 7 --to 8 --migrate-only
Using package manager: 'npm'
Collecting installed dependencies...
Found 30 dependencies.
Package "@angular\\core\\schematics\\migrations.json" was found but does not support schematics.
Angular CLI: 8.0.0
Node: 10.10.0
OS: win32 x64
Angular: 8.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.0
@angular-devkit/build-angular 0.800.0
@angular-devkit/build-optimizer 0.800.0
@angular-devkit/build-webpack 0.800.0
@angular-devkit/core 8.0.0
@angular-devkit/schematics 8.0.0
@ngtools/webpack 8.0.0
@schematics/angular 8.0.0
@schematics/update 0.800.0
rxjs 6.4.0
typescript 3.4.5
webpack 4.30.0
Hello
what happen this error

@TunMyintThein1995 That is because the angular team changed the functionality of ViewChild so now you have you change it to something similar to this,
@ViewChild(MatSort, {static: false}) sort: MatSort;
Here is a link to the documentation about the different meta properties that you can now use.
https://angular.io/api/core/ViewChild
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@TunMyintThein1995 That is because the angular team changed the functionality of ViewChild so now you have you change it to something similar to this,
@ViewChild(MatSort, {static: false}) sort: MatSort;Here is a link to the documentation about the different meta properties that you can now use.
https://angular.io/api/core/ViewChild