Skip to content

docs-bug(component examples): examples for docs/StackBlitz lack Eager CD strategy and Zone.js CD provider #33443

Description

@michael-small

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: material.angular.iodocsThis issue is related to documentationgemini-triagedLabel noting that an issue has been triaged by geminineeds triageThis issue needs to be triaged by the team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions