Skip to content

Two consecutive commas generated with nav schematics #14366

Closed
@klemenoslaj

Description

@klemenoslaj

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Generating nav using material schematics should generate valid TypeScript code.

What is the current behavior?

When generating the nav with OnPush changeDetection we get two consecutive commas.

What are the steps to reproduce?

Execute the following command in Angular workspace:

ng generate @angular/material:nav navigation --project myProject --changeDetection=OnPush

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 7.1.0
Node: 10.13.0
OS: darwin x64
Angular: 7.1.0
... animations, bazel, common, compiler, compiler-cli, core
... elements, forms, http, platform-browser
... platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.10.6
@angular-devkit/core 7.0.6
@angular-devkit/schematics 7.0.6
@schematics/angular 7.0.6
@schematics/update 0.11.0 (cli-only)
rxjs 6.3.3
typescript 3.1.1

Is there anything else we should know?

I would be filling to submit my first pull request to fix this issue.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions