Skip to content

bug(Schematics): Modernize schematics #33460

In review

Description

@hb20007

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I opened an Issue for modernizing the Navigation schematic: #33381. I have since observed that all the other schematics generate code with similar issues, so I am opening this Issue for improving and modernizing the code generated by the rest of the schematics, namely:

  • 1. address-form
  • 2. dashboard
  • 3. table
  • 4. tree

These are the issues I have observed:

  1. The code includes M2 APIs that are no longer relevant. E.g., address-form generates a button with color="primary", and table generates a table with mat-elevation-z2.
  2. The code includes Reactive Forms (e.g., address-form). This should be replaced with Signal Forms, or a command line argument needs to be provided to indicate Signal Forms.
  3. The tree schematic generates code that is based on deprecated modules: MatTreeFlatDataSource, MatTreeFlattener, and FlatTreeControl. Moreover, in the template, there is an empty button <button matIconButton disabled></button>. The icon is incorrectly placed after the button rather than within it.

Reproduction

This issue does not require a StackBlitz reproduction because these are comments on the code generated by the schematics.

Expected Behavior

The schematics should produce quality code and set the standard for implementing Material Design components.

Actual Behavior

The code has several issues.

Environment

Angular CLI : 22.0.1
Angular : 22.0.1
Node.js : 26.1.0
Package Manager : npm 11.16.0
Operating System : win32 x64
Browser: Chrome

Activity

  1. added
    needs triage
    on Jun 28, 2026
  2. added
    area: ng-generate
    gemini-triaged
    on Jun 28, 2026
  3. added
    P3
    and removed
    needs triage
    on Jul 8, 2026
  4. BHUVANSH855 commented on Jul 24, 2026

    @BHUVANSH855
    Contributor

    After looking into this issue, I investigated the current tree schematic as well as the latest Material tree examples.

    The current schematic still generates code using FlatTreeControl, MatTreeFlattener, and MatTreeFlatDataSource, while the newer Material tree examples (tree-flat-overview and tree-flat-child-accessor-overview) use the childrenAccessor pattern instead.

    Would the preferred direction for this schematic be to modernize it so that it matches the current examples (i.e. replace the deprecated APIs with the childrenAccessor-based implementation), or is there another approach you'd like the schematic to follow?

  5. hb20007 commented on Jul 25, 2026

    @hb20007
    Author

    @BHUVANSH855, if the question is directed me, I don't know of any other approach besides childrenAccessor for the tree schematic.

  6. removed
    gemini-triaged
    on Sep 25, 2026
  7. self-assigned this
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3area: ng-generate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions