Search code examples
angular-cliangular-routingangular-cli-v7

Auto declare components, path in routing module at the time of create a new components Angular 7


  1. for example if we create any component from angular-cli (ng g component compName ) it is automatically declaring

https://i.sstatic.net/KiXzj.jpg

  1. same way i want to declare automatically in routing at the time of component creation, like this

https://i.sstatic.net/RthNi.jpg


Solution

  • We cannot declare the routes automatically, its totally depends on the functionality. We need to add them manually.