How to generate route.ts file using angular cli in angular js?

Suppose I have a module xyz , I ahve already created xyz.module.ts file but now I want to create xyz.route.ts how can I create it ?
I tried this command in angular cli

                  ng generate  xyz --routing 

but its not working .

Hi @xcfx2888, if you run that line you’ll get an error that the schematic “xyz” is not found – the command goes

ng generate module xyz --routing

If the module “xyz” already exists you’ll have to bite the bullet and create the routing module yourself though.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.