From fe2fc3d0329fc6413e8ef2527ddde3d61aec15a5 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 28 Jul 2026 09:59:22 +0200 Subject: [PATCH] fix(material/schematics): resolve issues in navigation schematic Resolves the following issues in the navigation schematic: 1. We were using observables instead of signals for `isHandset`. 2. We were using `color` on the toolbar. 3. One of the `standalone` checks in the generated test was flipped. Fixes #33381. --- .../__name@dasherize__.component.html.template | 12 +++++++----- .../__name@dasherize__.component.spec.ts.template | 2 +- .../__name@dasherize__.component.ts.template | 14 +++++--------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/material/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template b/src/material/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template index a8841650ade9..a16f1f2bd276 100644 --- a/src/material/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +++ b/src/material/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template @@ -1,8 +1,10 @@ +@let isHandset = this.isHandset(); + + [attr.role]="isHandset ? 'dialog' : 'navigation'" + [mode]="isHandset ? 'over' : 'side'" + [opened]="isHandset === false"> Menu >Link 1 @@ -11,8 +13,8 @@ - - @if (isHandset$ | async) { + + @if (isHandset) {