Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 1.93 KB

README.md

File metadata and controls

38 lines (23 loc) · 1.93 KB

Bug Change Detection

Author: Thomas Laforge

This challenge is inspired by a real-life example that I simplified to create this nice challenge.

Information

In this small application, we have a navigation menu to route our application to either barComponent or FooComponent. However our application is not loading and no errors are displayed inside the console.

Statement

The goal of the challenge is to debug this application and make it work.

Hint 1

If you comment out routerLinkActive="isSelected" inside NavigationComponent: the application loads correctly.

Hint 2

If you open the RouterLinkActive source code and go to line 196, Angular is calling this.cdr.markForCheck inside a microTask which triggers a new CD cycle. If you comment out this line, the application loads again, however the bug is not inside the Angular Framework. 😅😯

Submitting your work

  1. Fork the project
  2. clone it
  3. npm ci
  4. npx nx serve bug-cd
  5. ...work on it
  6. Commit your work
  7. Submit a PR with a title beginning with Answer:32 that I will review and other dev can review.

bug-cd bug-cd solution author

You can ask any question on twitter