Skip to content

Material Navigation schematic should use the configured prefix in the generated component selector #11525

Closed
@juristr

Description

@juristr

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When I generate a new component using the new Material schematic for the navigation, for example using shell as my name

ng generate @angular/material:material-nav --name Shell

..then it should create a ShellComponent which uses the app-shell as it's selector.

What is the current behavior?

The selector is shell, like

@Component({
   selector: 'shell'
})
...

What are the steps to reproduce?

Just create a new Angular project, add material and then generate use the schematics command for generating a navigation component:

ng generate @angular/material:material-nav --name Shell

What is the use-case or motivation for changing an existing behavior?

It should follow the standard Angular CLI behavior when generating components.

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

Angular CLI: 6.0.5
Node: 9.11.1
OS: darwin x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.5
@angular-devkit/build-angular     0.6.5
@angular-devkit/build-optimizer   0.6.5
@angular-devkit/core              0.6.5
@angular-devkit/schematics        0.6.5
@angular/cdk                      6.1.0
@angular/cli                      6.0.5
@angular/flex-layout              6.0.0-beta.15
@angular/material                 6.1.0
@ngtools/webpack                  6.0.5
@schematics/angular               0.6.5
@schematics/update                0.6.5
rxjs                              6.2.0
typescript                        2.7.2
webpack                           4.8.3

Is there anything else we should know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions