how to create angular component code example
Example 1: angular new component
ng g c componentName
Example 2: angular generate component
ng g component componentname
Example 3: angular new component
ng generate component componentName
Example 4: create angular component using cli
ng generate component hero-detail
Example 5: auto generate component angular
ng g component [directory-where-you-want-to-save-the-component]/[new-component-name]
ng generate component [directory-where-you-want-to-save-the-component]/[new-component-name]