Skip to content

bug(Navigation schematic): Several issues in the code generated by the navigation schematic #33381

@hb20007

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 just tried the navigation schematic. I was expecting to get a nice toolbar, but instead got something disappointing. I see at least the following issues:

  1. It uses color="primary", which I believe is a Material 2 concept.
  2. It uses observables. This seems overkill for a nav bar, and the modern Angular way is to use signals.
  3. The mobile functionality is broken. It doesn't collapse when you click on the page. It only does when you click on the nav bar area.

I haven't tried the rest of the schematics, but this doesn't look promising regarding the rest of them.

Reproduction

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

Expected Behavior

It just produce quality code and be the standard for implementing a navigation bar.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: ng-generateSchematics that generate code in user projectsgemini-triagedLabel noting that an issue has been triaged by gemini

    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