CATcher-org / CATcher-org/CATcher
Follow recommended practice for ViewChild
- Dominant language
- TypeScript
- Stars
- 92
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
A new `static` flag has been added to `ViewChild` starting from Angular 8.0.
This flag should be `false` by default, if we follow Angular's recommended practice of using `ngAfterViewInit()` for view queries for `ViewChild`. (Please refer to: https://angular.io/guide/static-query-migration)

From Angular 9.0, the `static` flag will be removed for default value `false`. We should aim to revert to the best practice ideally before upgrading to Angular 9.0.
## Summary:
Let's follow the recommended practice of using `ngAfterViewInit()` for `ViewChild` view queries.
**More details about the change found in Angular upgrade pull request
Contributor guide
No contributing guide indexed for this repository
Research direction
Search the project for ViewChild queries and check how each is used relative to ngAfterViewInit(), using the Angular static-query migration guidance linked in the issue as the starting point. Done means the relevant view queries follow the recommended false-static behavior and the application still works correctly before an Angular 9 upgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100