Skip to content

Proposal: Improve Generator Schematics documentation #11293

Closed
@jplew

Description

@jplew

Bug, feature request, or proposal:

Proposal

What is the expected behavior?

On this page of the docs, https://material.angular.io/guide/schematics#dashboard-schematic, it gives the following command: ng generate @angular/material:material-dashboard

I expect this to work.

What is the current behavior?

This command fails with the following error:

Schematic input does not validate against the Schema: {"dryRun":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","styleext":"css","spec":true,"flat":false,"skipImport":false,"export":false}

Data path "" should have required property 'name'.

This command fails because it omits the --name flag: ng generate @angular/material:material-dashboard --name=my-dashboard

What are the steps to reproduce?

Run ng generate @angular/material:material-dashboard.

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

When I find a command in the official docs, I expect it to work on the first try. I had to do some research to figure out why it wasn't working.

Either the error message should be improved, or get the CLI to use a default name, or mention the fact that the command will fail without the --name flag.

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

Angular 6.0.0
Material 6.0.0

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