0 votes
in Angular by

How do you create directives using CLI?

1 Answer

0 votes
by

You can use CLI command ng generate directive to create the directive class file. It creates the source file(src/app/components/directivename.directive.ts), the respective test file .spec.ts and declare the directive class file in root module.

...