ng g c keydemo --spec=false
Error: Unknown argument.
This is coming up when I am trying to make a new component without a spec.ts
file for it.
I am using Angular version 18 for this.
1
For Angular CLI v8 and later:
ng generate component your-component-name --skip-tests
For Angular CLI v6 and earlier
ng generate component your-component-name --spec=false
It throws an error because --spec
is not a valid option. To generate a new component without a spec file, use the --skip-tests
option:
ng g c keydemo --skip-tests
See the docs.