Angular Material : Material Navigation does not work

662 Views Asked by At

I want to create a navigation schematics with this command :

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

But it gives me an error as below :

The 'path' option in '...\node_modules@angular\material\schematics\ng-generate\navigation\schema.json' is using deprecated behaviour. 'workingDirectory' smart default provider should be used instead. (0 , validation_1.validateName) is not a function

1

There are 1 best solutions below

0
Manoj MV On

Me too with a similar problem.

It may occur as a result of a version mismatch between the angular and the material.

Execute the following command to get a picture of the version mismatch.

ng update

If mismatched, update '@angular/material' using the following command.

ng update @angular/material@14

replace 14 with your angular version. That worked for me.