Documentation Feedback
Problem
Documentation examples need Eager change detection and the StackBlitz template needs to provide Zone.js change detection.
Background
I found two related issues when trying to figure out why the "Table retrieving data through HTTP" example was not rendering data and not quitting it's loading spinner:
I gave more detailed notes on this trial and error explanation on Reddit, when someone said they had issues with tables not rendering data: reddit.com/r/angular/comments/1udhis7/comment/othat1k
Proposed Immediate Solution
Most if not all documentation examples I have seen relied on what is now Eager change detection, and on Zone.js. But any examples I have seen were not opted into Eager CD strategy and the StackBlitz starter does not provide provideZoneChangeDetection()
Without fundamentally making all docs examples zoneless and default OnPush ready, two things need to happen
provideZoneChangeDetection() needs to be provided in the StackBlitz template
- Example files all need
changeDetection: ChangeDetectionStrategy.Eager
And if possible, backport this to v21 docs
Proposed Long Term Solution
Convert documentation examples going forward into the new default change detection and zoneless defaults, dropping the providing of Eager and Zone.
Links
Affected documentation page
https://material.angular.dev/components/categories
Documentation Feedback
Problem
Documentation examples need
Eagerchange detection and the StackBlitz template needs to provide Zone.js change detection.Background
I found two related issues when trying to figure out why the "Table retrieving data through HTTP" example was not rendering data and not quitting it's loading spinner:
I gave more detailed notes on this trial and error explanation on Reddit, when someone said they had issues with tables not rendering data: reddit.com/r/angular/comments/1udhis7/comment/othat1k
Proposed Immediate Solution
Most if not all documentation examples I have seen relied on what is now
Eagerchange detection, and on Zone.js. But any examples I have seen were not opted intoEagerCD strategy and the StackBlitz starter does not provideprovideZoneChangeDetection()Without fundamentally making all docs examples zoneless and default OnPush ready, two things need to happen
provideZoneChangeDetection()needs to be provided in the StackBlitz templatechangeDetection: ChangeDetectionStrategy.EagerAnd if possible, backport this to v21 docs
Proposed Long Term Solution
Convert documentation examples going forward into the new default change detection and zoneless defaults, dropping the providing of Eager and Zone.
Links
RuntimeError: NG0100: ExpressionChangedAfterItHasBeenCheckedErrorin the StackBlitz.Eager+ Zone.js: https://stackblitz.com/edit/upsjm4jr?file=src%2Fexample%2Ftable-http-example.tsAffected documentation page
https://material.angular.dev/components/categories