create component in angular with routing cli command code example
Example 1: generate module with routing in angular
ng g m [ModuleName] --routing
Example 2: angular cli generate component
ng g c componentName
ng g m [ModuleName] --routing
ng g c componentName