Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material Side Nav Generator

I read about the new ng generate @angular/material:material-nav feature in this recent Angular blog entry .

Unfortunately, when running the following CLI commands in a brand new project, I get an error message (see below).

ng add @angular/material
ng generate @angular/material:material-nav

Error message:

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}
Errors:

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

This kind of sucks. I tried adding a name like this

ng generate @angular/material:material-nav home

But it still produces the same error. Please advice.

Angular CLI: 6.0.0 Node: 8.11.1 OS: darwin x64 Angular: 6.0.0

like image 354
Arne Wolframm Avatar asked May 08 '26 05:05

Arne Wolframm


1 Answers

The error means that the property name is required, so the command should be something like this:

ng generate @angular/material:material-nav --name <component-name>

For example:

ng generate @angular/material:material-nav --name home
like image 141
mauriciovigolo Avatar answered May 10 '26 01:05

mauriciovigolo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!